// Generated by the protocol buffer compiler.  DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: xla/service/memory_space_assignment/memory_space_assignment.proto
// Protobuf C++ Version: 6.31.1

#ifndef xla_2fservice_2fmemory_5fspace_5fassignment_2fmemory_5fspace_5fassignment_2eproto_2epb_2eh
#define xla_2fservice_2fmemory_5fspace_5fassignment_2fmemory_5fspace_5fassignment_2eproto_2epb_2eh

#include <limits>
#include <string>
#include <type_traits>
#include <utility>

#include "google/protobuf/runtime_version.h"
#if PROTOBUF_VERSION != 6031001
#error "Protobuf C++ gencode is built with an incompatible version of"
#error "Protobuf C++ headers/runtime. See"
#error "https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp"
#endif
#include "google/protobuf/io/coded_stream.h"
#include "google/protobuf/arena.h"
#include "google/protobuf/arenastring.h"
#include "google/protobuf/generated_message_bases.h"
#include "google/protobuf/generated_message_tctable_decl.h"
#include "google/protobuf/generated_message_util.h"
#include "google/protobuf/metadata_lite.h"
#include "google/protobuf/generated_message_reflection.h"
#include "google/protobuf/message.h"
#include "google/protobuf/message_lite.h"
#include "google/protobuf/repeated_field.h"  // IWYU pragma: export
#include "google/protobuf/extension_set.h"  // IWYU pragma: export
#include "google/protobuf/generated_enum_reflection.h"
#include "google/protobuf/unknown_field_set.h"
// @@protoc_insertion_point(includes)

// Must be included last.
#include "google/protobuf/port_def.inc"

#define PROTOBUF_INTERNAL_EXPORT_xla_2fservice_2fmemory_5fspace_5fassignment_2fmemory_5fspace_5fassignment_2eproto PROTOBUF_EXPORT

namespace google {
namespace protobuf {
namespace internal {
template <typename T>
::absl::string_view GetAnyMessageName();
}  // namespace internal
}  // namespace protobuf
}  // namespace google

// Internal implementation detail -- do not use these members.
struct PROTOBUF_EXPORT TableStruct_xla_2fservice_2fmemory_5fspace_5fassignment_2fmemory_5fspace_5fassignment_2eproto {
  static const ::uint32_t offsets[];
};
extern "C" {
PROTOBUF_EXPORT extern const ::google::protobuf::internal::DescriptorTable descriptor_table_xla_2fservice_2fmemory_5fspace_5fassignment_2fmemory_5fspace_5fassignment_2eproto;
}  // extern "C"
namespace xla {
namespace memory_space_assignment {
enum ExpandedScopedAlternateMemoryMode_Value : int;
PROTOBUF_EXPORT extern const uint32_t ExpandedScopedAlternateMemoryMode_Value_internal_data_[];
class ExpandedScopedAlternateMemoryMode;
struct ExpandedScopedAlternateMemoryModeDefaultTypeInternal;
PROTOBUF_EXPORT extern ExpandedScopedAlternateMemoryModeDefaultTypeInternal _ExpandedScopedAlternateMemoryMode_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull ExpandedScopedAlternateMemoryMode_class_data_;
class HloOperandFilter;
struct HloOperandFilterDefaultTypeInternal;
PROTOBUF_EXPORT extern HloOperandFilterDefaultTypeInternal _HloOperandFilter_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull HloOperandFilter_class_data_;
class HloPositionMatcher;
struct HloPositionMatcherDefaultTypeInternal;
PROTOBUF_EXPORT extern HloPositionMatcherDefaultTypeInternal _HloPositionMatcher_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull HloPositionMatcher_class_data_;
class HloRandomFilter;
struct HloRandomFilterDefaultTypeInternal;
PROTOBUF_EXPORT extern HloRandomFilterDefaultTypeInternal _HloRandomFilter_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull HloRandomFilter_class_data_;
class MemoryBoundLoopOptimizerOptions;
struct MemoryBoundLoopOptimizerOptionsDefaultTypeInternal;
PROTOBUF_EXPORT extern MemoryBoundLoopOptimizerOptionsDefaultTypeInternal _MemoryBoundLoopOptimizerOptions_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull MemoryBoundLoopOptimizerOptions_class_data_;
class MsaSortOrderOverride;
struct MsaSortOrderOverrideDefaultTypeInternal;
PROTOBUF_EXPORT extern MsaSortOrderOverrideDefaultTypeInternal _MsaSortOrderOverride_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull MsaSortOrderOverride_class_data_;
class MsaSortOrderOverrideOptions;
struct MsaSortOrderOverrideOptionsDefaultTypeInternal;
PROTOBUF_EXPORT extern MsaSortOrderOverrideOptionsDefaultTypeInternal _MsaSortOrderOverrideOptions_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull MsaSortOrderOverrideOptions_class_data_;
class MsaSortOrderOverrides;
struct MsaSortOrderOverridesDefaultTypeInternal;
PROTOBUF_EXPORT extern MsaSortOrderOverridesDefaultTypeInternal _MsaSortOrderOverrides_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull MsaSortOrderOverrides_class_data_;
class PreferredPrefetchOverride;
struct PreferredPrefetchOverrideDefaultTypeInternal;
PROTOBUF_EXPORT extern PreferredPrefetchOverrideDefaultTypeInternal _PreferredPrefetchOverride_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull PreferredPrefetchOverride_class_data_;
class PreferredPrefetchOverrideOptions;
struct PreferredPrefetchOverrideOptionsDefaultTypeInternal;
PROTOBUF_EXPORT extern PreferredPrefetchOverrideOptionsDefaultTypeInternal _PreferredPrefetchOverrideOptions_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull PreferredPrefetchOverrideOptions_class_data_;
class PreferredPrefetchOverrides;
struct PreferredPrefetchOverridesDefaultTypeInternal;
PROTOBUF_EXPORT extern PreferredPrefetchOverridesDefaultTypeInternal _PreferredPrefetchOverrides_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull PreferredPrefetchOverrides_class_data_;
class SlicedPrefetchOptions;
struct SlicedPrefetchOptionsDefaultTypeInternal;
PROTOBUF_EXPORT extern SlicedPrefetchOptionsDefaultTypeInternal _SlicedPrefetchOptions_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull SlicedPrefetchOptions_class_data_;
class TupleShapeIndex;
struct TupleShapeIndexDefaultTypeInternal;
PROTOBUF_EXPORT extern TupleShapeIndexDefaultTypeInternal _TupleShapeIndex_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull TupleShapeIndex_class_data_;
}  // namespace memory_space_assignment
}  // namespace xla
namespace google {
namespace protobuf {
template <>
internal::EnumTraitsT<::xla::memory_space_assignment::ExpandedScopedAlternateMemoryMode_Value_internal_data_>
    internal::EnumTraitsImpl::value<::xla::memory_space_assignment::ExpandedScopedAlternateMemoryMode_Value>;
}  // namespace protobuf
}  // namespace google

namespace xla {
namespace memory_space_assignment {
enum ExpandedScopedAlternateMemoryMode_Value : int {
  ExpandedScopedAlternateMemoryMode_Value_UNDEFINED = 0,
  ExpandedScopedAlternateMemoryMode_Value_DISABLED = 1,
  ExpandedScopedAlternateMemoryMode_Value_ENABLED = 2,
  ExpandedScopedAlternateMemoryMode_Value_ExpandedScopedAlternateMemoryMode_Value_INT_MIN_SENTINEL_DO_NOT_USE_ =
      ::std::numeric_limits<::int32_t>::min(),
  ExpandedScopedAlternateMemoryMode_Value_ExpandedScopedAlternateMemoryMode_Value_INT_MAX_SENTINEL_DO_NOT_USE_ =
      ::std::numeric_limits<::int32_t>::max(),
};

PROTOBUF_EXPORT extern const uint32_t ExpandedScopedAlternateMemoryMode_Value_internal_data_[];
inline constexpr ExpandedScopedAlternateMemoryMode_Value ExpandedScopedAlternateMemoryMode_Value_Value_MIN =
    static_cast<ExpandedScopedAlternateMemoryMode_Value>(0);
inline constexpr ExpandedScopedAlternateMemoryMode_Value ExpandedScopedAlternateMemoryMode_Value_Value_MAX =
    static_cast<ExpandedScopedAlternateMemoryMode_Value>(2);
inline bool ExpandedScopedAlternateMemoryMode_Value_IsValid(int value) {
  return 0 <= value && value <= 2;
}
inline constexpr int ExpandedScopedAlternateMemoryMode_Value_Value_ARRAYSIZE = 2 + 1;
PROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL ExpandedScopedAlternateMemoryMode_Value_descriptor();
template <typename T>
const ::std::string& ExpandedScopedAlternateMemoryMode_Value_Name(T value) {
  static_assert(::std::is_same<T, ExpandedScopedAlternateMemoryMode_Value>::value ||
                    ::std::is_integral<T>::value,
                "Incorrect type passed to Value_Name().");
  return ExpandedScopedAlternateMemoryMode_Value_Name(static_cast<ExpandedScopedAlternateMemoryMode_Value>(value));
}
template <>
inline const ::std::string& ExpandedScopedAlternateMemoryMode_Value_Name(ExpandedScopedAlternateMemoryMode_Value value) {
  return ::google::protobuf::internal::NameOfDenseEnum<ExpandedScopedAlternateMemoryMode_Value_descriptor, 0, 2>(
      static_cast<int>(value));
}
inline bool ExpandedScopedAlternateMemoryMode_Value_Parse(
    ::absl::string_view name, ExpandedScopedAlternateMemoryMode_Value* PROTOBUF_NONNULL value) {
  return ::google::protobuf::internal::ParseNamedEnum<ExpandedScopedAlternateMemoryMode_Value>(ExpandedScopedAlternateMemoryMode_Value_descriptor(), name,
                                           value);
}

// ===================================================================


// -------------------------------------------------------------------

class PROTOBUF_EXPORT TupleShapeIndex final : public ::google::protobuf::Message
/* @@protoc_insertion_point(class_definition:xla.memory_space_assignment.TupleShapeIndex) */ {
 public:
  inline TupleShapeIndex() : TupleShapeIndex(nullptr) {}
  ~TupleShapeIndex() PROTOBUF_FINAL;

#if defined(PROTOBUF_CUSTOM_VTABLE)
  void operator delete(TupleShapeIndex* PROTOBUF_NONNULL msg, std::destroying_delete_t) {
    SharedDtor(*msg);
    ::google::protobuf::internal::SizedDelete(msg, sizeof(TupleShapeIndex));
  }
#endif

  template <typename = void>
  explicit PROTOBUF_CONSTEXPR TupleShapeIndex(::google::protobuf::internal::ConstantInitialized);

  inline TupleShapeIndex(const TupleShapeIndex& from) : TupleShapeIndex(nullptr, from) {}
  inline TupleShapeIndex(TupleShapeIndex&& from) noexcept
      : TupleShapeIndex(nullptr, ::std::move(from)) {}
  inline TupleShapeIndex& operator=(const TupleShapeIndex& from) {
    CopyFrom(from);
    return *this;
  }
  inline TupleShapeIndex& operator=(TupleShapeIndex&& from) noexcept {
    if (this == &from) return *this;
    if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) {
      InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance);
  }
  inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields()
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>();
  }

  static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() {
    return GetDescriptor();
  }
  static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() {
    return default_instance().GetMetadata().descriptor;
  }
  static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() {
    return default_instance().GetMetadata().reflection;
  }
  static const TupleShapeIndex& default_instance() {
    return *reinterpret_cast<const TupleShapeIndex*>(
        &_TupleShapeIndex_default_instance_);
  }
  static constexpr int kIndexInFileMessages = 2;
  friend void swap(TupleShapeIndex& a, TupleShapeIndex& b) { a.Swap(&b); }
  inline void Swap(TupleShapeIndex* PROTOBUF_NONNULL other) {
    if (other == this) return;
    if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) {
      InternalSwap(other);
    } else {
      ::google::protobuf::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(TupleShapeIndex* PROTOBUF_NONNULL other) {
    if (other == this) return;
    ABSL_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  TupleShapeIndex* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const {
    return ::google::protobuf::Message::DefaultConstruct<TupleShapeIndex>(arena);
  }
  using ::google::protobuf::Message::CopyFrom;
  void CopyFrom(const TupleShapeIndex& from);
  using ::google::protobuf::Message::MergeFrom;
  void MergeFrom(const TupleShapeIndex& from) { TupleShapeIndex::MergeImpl(*this, from); }

  private:
  static void MergeImpl(::google::protobuf::MessageLite& to_msg,
                        const ::google::protobuf::MessageLite& from_msg);

  public:
  bool IsInitialized() const {
    return true;
  }
  ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL;
  #if defined(PROTOBUF_CUSTOM_VTABLE)
  private:
  static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg);
  static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream);

  public:
  ::size_t ByteSizeLong() const { return ByteSizeLong(*this); }
  ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
    return _InternalSerialize(*this, target, stream);
  }
  #else   // PROTOBUF_CUSTOM_VTABLE
  ::size_t ByteSizeLong() const final;
  ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final;
  #endif  // PROTOBUF_CUSTOM_VTABLE
  int GetCachedSize() const { return _impl_._cached_size_.Get(); }

  private:
  void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  static void SharedDtor(MessageLite& self);
  void InternalSwap(TupleShapeIndex* PROTOBUF_NONNULL other);
 private:
  template <typename T>
  friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)();
  static ::absl::string_view FullMessageName() { return "xla.memory_space_assignment.TupleShapeIndex"; }

 protected:
  explicit TupleShapeIndex(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  TupleShapeIndex(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TupleShapeIndex& from);
  TupleShapeIndex(
      ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TupleShapeIndex&& from) noexcept
      : TupleShapeIndex(arena) {
    *this = ::std::move(from);
  }
  const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL;
  static void* PROTOBUF_NONNULL PlacementNew_(
      const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
      ::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  static constexpr auto InternalNewImpl_();

 public:
  static constexpr auto InternalGenerateClassData_();

  ::google::protobuf::Metadata GetMetadata() const;
  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------
  enum : int {
    kIndexFieldNumber = 1,
  };
  // repeated int64 index = 1;
  int index_size() const;
  private:
  int _internal_index_size() const;

  public:
  void clear_index() ;
  ::int64_t index(int index) const;
  void set_index(int index, ::int64_t value);
  void add_index(::int64_t value);
  const ::google::protobuf::RepeatedField<::int64_t>& index() const;
  ::google::protobuf::RepeatedField<::int64_t>* PROTOBUF_NONNULL mutable_index();

  private:
  const ::google::protobuf::RepeatedField<::int64_t>& _internal_index() const;
  ::google::protobuf::RepeatedField<::int64_t>* PROTOBUF_NONNULL _internal_mutable_index();

  public:
  // @@protoc_insertion_point(class_scope:xla.memory_space_assignment.TupleShapeIndex)
 private:
  class _Internal;
  friend class ::google::protobuf::internal::TcParser;
  static const ::google::protobuf::internal::TcParseTable<0, 1,
                                   0, 0,
                                   2>
      _table_;

  friend class ::google::protobuf::MessageLite;
  friend class ::google::protobuf::Arena;
  template <typename T>
  friend class ::google::protobuf::Arena::InternalHelper;
  using InternalArenaConstructable_ = void;
  using DestructorSkippable_ = void;
  struct Impl_ {
    inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept;
    inline explicit Impl_(
        ::google::protobuf::internal::InternalVisibility visibility,
        ::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
    inline explicit Impl_(
        ::google::protobuf::internal::InternalVisibility visibility,
        ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
        const TupleShapeIndex& from_msg);
    ::google::protobuf::RepeatedField<::int64_t> index_;
    ::google::protobuf::internal::CachedSize _index_cached_byte_size_;
    ::google::protobuf::internal::CachedSize _cached_size_;
    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_xla_2fservice_2fmemory_5fspace_5fassignment_2fmemory_5fspace_5fassignment_2eproto;
};

PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull TupleShapeIndex_class_data_;
// -------------------------------------------------------------------

class PROTOBUF_EXPORT SlicedPrefetchOptions final : public ::google::protobuf::Message
/* @@protoc_insertion_point(class_definition:xla.memory_space_assignment.SlicedPrefetchOptions) */ {
 public:
  inline SlicedPrefetchOptions() : SlicedPrefetchOptions(nullptr) {}
  ~SlicedPrefetchOptions() PROTOBUF_FINAL;

#if defined(PROTOBUF_CUSTOM_VTABLE)
  void operator delete(SlicedPrefetchOptions* PROTOBUF_NONNULL msg, std::destroying_delete_t) {
    SharedDtor(*msg);
    ::google::protobuf::internal::SizedDelete(msg, sizeof(SlicedPrefetchOptions));
  }
#endif

  template <typename = void>
  explicit PROTOBUF_CONSTEXPR SlicedPrefetchOptions(::google::protobuf::internal::ConstantInitialized);

  inline SlicedPrefetchOptions(const SlicedPrefetchOptions& from) : SlicedPrefetchOptions(nullptr, from) {}
  inline SlicedPrefetchOptions(SlicedPrefetchOptions&& from) noexcept
      : SlicedPrefetchOptions(nullptr, ::std::move(from)) {}
  inline SlicedPrefetchOptions& operator=(const SlicedPrefetchOptions& from) {
    CopyFrom(from);
    return *this;
  }
  inline SlicedPrefetchOptions& operator=(SlicedPrefetchOptions&& from) noexcept {
    if (this == &from) return *this;
    if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) {
      InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance);
  }
  inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields()
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>();
  }

  static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() {
    return GetDescriptor();
  }
  static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() {
    return default_instance().GetMetadata().descriptor;
  }
  static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() {
    return default_instance().GetMetadata().reflection;
  }
  static const SlicedPrefetchOptions& default_instance() {
    return *reinterpret_cast<const SlicedPrefetchOptions*>(
        &_SlicedPrefetchOptions_default_instance_);
  }
  static constexpr int kIndexInFileMessages = 0;
  friend void swap(SlicedPrefetchOptions& a, SlicedPrefetchOptions& b) { a.Swap(&b); }
  inline void Swap(SlicedPrefetchOptions* PROTOBUF_NONNULL other) {
    if (other == this) return;
    if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) {
      InternalSwap(other);
    } else {
      ::google::protobuf::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(SlicedPrefetchOptions* PROTOBUF_NONNULL other) {
    if (other == this) return;
    ABSL_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  SlicedPrefetchOptions* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const {
    return ::google::protobuf::Message::DefaultConstruct<SlicedPrefetchOptions>(arena);
  }
  using ::google::protobuf::Message::CopyFrom;
  void CopyFrom(const SlicedPrefetchOptions& from);
  using ::google::protobuf::Message::MergeFrom;
  void MergeFrom(const SlicedPrefetchOptions& from) { SlicedPrefetchOptions::MergeImpl(*this, from); }

  private:
  static void MergeImpl(::google::protobuf::MessageLite& to_msg,
                        const ::google::protobuf::MessageLite& from_msg);

  public:
  bool IsInitialized() const {
    return true;
  }
  ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL;
  #if defined(PROTOBUF_CUSTOM_VTABLE)
  private:
  static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg);
  static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream);

  public:
  ::size_t ByteSizeLong() const { return ByteSizeLong(*this); }
  ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
    return _InternalSerialize(*this, target, stream);
  }
  #else   // PROTOBUF_CUSTOM_VTABLE
  ::size_t ByteSizeLong() const final;
  ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final;
  #endif  // PROTOBUF_CUSTOM_VTABLE
  int GetCachedSize() const { return _impl_._cached_size_.Get(); }

  private:
  void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  static void SharedDtor(MessageLite& self);
  void InternalSwap(SlicedPrefetchOptions* PROTOBUF_NONNULL other);
 private:
  template <typename T>
  friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)();
  static ::absl::string_view FullMessageName() { return "xla.memory_space_assignment.SlicedPrefetchOptions"; }

 protected:
  explicit SlicedPrefetchOptions(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  SlicedPrefetchOptions(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const SlicedPrefetchOptions& from);
  SlicedPrefetchOptions(
      ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, SlicedPrefetchOptions&& from) noexcept
      : SlicedPrefetchOptions(arena) {
    *this = ::std::move(from);
  }
  const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL;
  static void* PROTOBUF_NONNULL PlacementNew_(
      const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
      ::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  static constexpr auto InternalNewImpl_();

 public:
  static constexpr auto InternalGenerateClassData_();

  ::google::protobuf::Metadata GetMetadata() const;
  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------
  enum : int {
    kMinBytesFieldNumber = 2,
    kMaxSlicesFieldNumber = 1,
    kFailOnNonAlignmentBoundarySliceProposalFieldNumber = 3,
    kPreferredSliceSizeFieldNumber = 5,
    kAllSliceTimePermutationsThresholdFieldNumber = 4,
  };
  // uint64 min_bytes = 2;
  void clear_min_bytes() ;
  ::uint64_t min_bytes() const;
  void set_min_bytes(::uint64_t value);

  private:
  ::uint64_t _internal_min_bytes() const;
  void _internal_set_min_bytes(::uint64_t value);

  public:
  // uint32 max_slices = 1;
  void clear_max_slices() ;
  ::uint32_t max_slices() const;
  void set_max_slices(::uint32_t value);

  private:
  ::uint32_t _internal_max_slices() const;
  void _internal_set_max_slices(::uint32_t value);

  public:
  // bool fail_on_non_alignment_boundary_slice_proposal = 3;
  void clear_fail_on_non_alignment_boundary_slice_proposal() ;
  bool fail_on_non_alignment_boundary_slice_proposal() const;
  void set_fail_on_non_alignment_boundary_slice_proposal(bool value);

  private:
  bool _internal_fail_on_non_alignment_boundary_slice_proposal() const;
  void _internal_set_fail_on_non_alignment_boundary_slice_proposal(bool value);

  public:
  // uint64 preferred_slice_size = 5;
  void clear_preferred_slice_size() ;
  ::uint64_t preferred_slice_size() const;
  void set_preferred_slice_size(::uint64_t value);

  private:
  ::uint64_t _internal_preferred_slice_size() const;
  void _internal_set_preferred_slice_size(::uint64_t value);

  public:
  // uint32 all_slice_time_permutations_threshold = 4;
  void clear_all_slice_time_permutations_threshold() ;
  ::uint32_t all_slice_time_permutations_threshold() const;
  void set_all_slice_time_permutations_threshold(::uint32_t value);

  private:
  ::uint32_t _internal_all_slice_time_permutations_threshold() const;
  void _internal_set_all_slice_time_permutations_threshold(::uint32_t value);

  public:
  // @@protoc_insertion_point(class_scope:xla.memory_space_assignment.SlicedPrefetchOptions)
 private:
  class _Internal;
  friend class ::google::protobuf::internal::TcParser;
  static const ::google::protobuf::internal::TcParseTable<3, 5,
                                   0, 0,
                                   2>
      _table_;

  friend class ::google::protobuf::MessageLite;
  friend class ::google::protobuf::Arena;
  template <typename T>
  friend class ::google::protobuf::Arena::InternalHelper;
  using InternalArenaConstructable_ = void;
  using DestructorSkippable_ = void;
  struct Impl_ {
    inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept;
    inline explicit Impl_(
        ::google::protobuf::internal::InternalVisibility visibility,
        ::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
    inline explicit Impl_(
        ::google::protobuf::internal::InternalVisibility visibility,
        ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
        const SlicedPrefetchOptions& from_msg);
    ::google::protobuf::internal::HasBits<1> _has_bits_;
    ::google::protobuf::internal::CachedSize _cached_size_;
    ::uint64_t min_bytes_;
    ::uint32_t max_slices_;
    bool fail_on_non_alignment_boundary_slice_proposal_;
    ::uint64_t preferred_slice_size_;
    ::uint32_t all_slice_time_permutations_threshold_;
    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_xla_2fservice_2fmemory_5fspace_5fassignment_2fmemory_5fspace_5fassignment_2eproto;
};

PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull SlicedPrefetchOptions_class_data_;
// -------------------------------------------------------------------

class PROTOBUF_EXPORT MsaSortOrderOverrideOptions final : public ::google::protobuf::Message
/* @@protoc_insertion_point(class_definition:xla.memory_space_assignment.MsaSortOrderOverrideOptions) */ {
 public:
  inline MsaSortOrderOverrideOptions() : MsaSortOrderOverrideOptions(nullptr) {}
  ~MsaSortOrderOverrideOptions() PROTOBUF_FINAL;

#if defined(PROTOBUF_CUSTOM_VTABLE)
  void operator delete(MsaSortOrderOverrideOptions* PROTOBUF_NONNULL msg, std::destroying_delete_t) {
    SharedDtor(*msg);
    ::google::protobuf::internal::SizedDelete(msg, sizeof(MsaSortOrderOverrideOptions));
  }
#endif

  template <typename = void>
  explicit PROTOBUF_CONSTEXPR MsaSortOrderOverrideOptions(::google::protobuf::internal::ConstantInitialized);

  inline MsaSortOrderOverrideOptions(const MsaSortOrderOverrideOptions& from) : MsaSortOrderOverrideOptions(nullptr, from) {}
  inline MsaSortOrderOverrideOptions(MsaSortOrderOverrideOptions&& from) noexcept
      : MsaSortOrderOverrideOptions(nullptr, ::std::move(from)) {}
  inline MsaSortOrderOverrideOptions& operator=(const MsaSortOrderOverrideOptions& from) {
    CopyFrom(from);
    return *this;
  }
  inline MsaSortOrderOverrideOptions& operator=(MsaSortOrderOverrideOptions&& from) noexcept {
    if (this == &from) return *this;
    if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) {
      InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance);
  }
  inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields()
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>();
  }

  static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() {
    return GetDescriptor();
  }
  static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() {
    return default_instance().GetMetadata().descriptor;
  }
  static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() {
    return default_instance().GetMetadata().reflection;
  }
  static const MsaSortOrderOverrideOptions& default_instance() {
    return *reinterpret_cast<const MsaSortOrderOverrideOptions*>(
        &_MsaSortOrderOverrideOptions_default_instance_);
  }
  enum OptionsCase {
    kAssignFirst = 1,
    kAssignLast = 2,
    kAssignValue = 3,
    OPTIONS_NOT_SET = 0,
  };
  static constexpr int kIndexInFileMessages = 9;
  friend void swap(MsaSortOrderOverrideOptions& a, MsaSortOrderOverrideOptions& b) { a.Swap(&b); }
  inline void Swap(MsaSortOrderOverrideOptions* PROTOBUF_NONNULL other) {
    if (other == this) return;
    if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) {
      InternalSwap(other);
    } else {
      ::google::protobuf::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(MsaSortOrderOverrideOptions* PROTOBUF_NONNULL other) {
    if (other == this) return;
    ABSL_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  MsaSortOrderOverrideOptions* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const {
    return ::google::protobuf::Message::DefaultConstruct<MsaSortOrderOverrideOptions>(arena);
  }
  using ::google::protobuf::Message::CopyFrom;
  void CopyFrom(const MsaSortOrderOverrideOptions& from);
  using ::google::protobuf::Message::MergeFrom;
  void MergeFrom(const MsaSortOrderOverrideOptions& from) { MsaSortOrderOverrideOptions::MergeImpl(*this, from); }

  private:
  static void MergeImpl(::google::protobuf::MessageLite& to_msg,
                        const ::google::protobuf::MessageLite& from_msg);

  public:
  bool IsInitialized() const {
    return true;
  }
  ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL;
  #if defined(PROTOBUF_CUSTOM_VTABLE)
  private:
  static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg);
  static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream);

  public:
  ::size_t ByteSizeLong() const { return ByteSizeLong(*this); }
  ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
    return _InternalSerialize(*this, target, stream);
  }
  #else   // PROTOBUF_CUSTOM_VTABLE
  ::size_t ByteSizeLong() const final;
  ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final;
  #endif  // PROTOBUF_CUSTOM_VTABLE
  int GetCachedSize() const { return _impl_._cached_size_.Get(); }

  private:
  void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  static void SharedDtor(MessageLite& self);
  void InternalSwap(MsaSortOrderOverrideOptions* PROTOBUF_NONNULL other);
 private:
  template <typename T>
  friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)();
  static ::absl::string_view FullMessageName() { return "xla.memory_space_assignment.MsaSortOrderOverrideOptions"; }

 protected:
  explicit MsaSortOrderOverrideOptions(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  MsaSortOrderOverrideOptions(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const MsaSortOrderOverrideOptions& from);
  MsaSortOrderOverrideOptions(
      ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, MsaSortOrderOverrideOptions&& from) noexcept
      : MsaSortOrderOverrideOptions(arena) {
    *this = ::std::move(from);
  }
  const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL;
  static void* PROTOBUF_NONNULL PlacementNew_(
      const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
      ::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  static constexpr auto InternalNewImpl_();

 public:
  static constexpr auto InternalGenerateClassData_();

  ::google::protobuf::Metadata GetMetadata() const;
  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------
  enum : int {
    kAssignFirstFieldNumber = 1,
    kAssignLastFieldNumber = 2,
    kAssignValueFieldNumber = 3,
  };
  // bool assign_first = 1;
  bool has_assign_first() const;
  void clear_assign_first() ;
  bool assign_first() const;
  void set_assign_first(bool value);

  private:
  bool _internal_assign_first() const;
  void _internal_set_assign_first(bool value);

  public:
  // bool assign_last = 2;
  bool has_assign_last() const;
  void clear_assign_last() ;
  bool assign_last() const;
  void set_assign_last(bool value);

  private:
  bool _internal_assign_last() const;
  void _internal_set_assign_last(bool value);

  public:
  // int64 assign_value = 3;
  bool has_assign_value() const;
  void clear_assign_value() ;
  ::int64_t assign_value() const;
  void set_assign_value(::int64_t value);

  private:
  ::int64_t _internal_assign_value() const;
  void _internal_set_assign_value(::int64_t value);

  public:
  void clear_options();
  OptionsCase options_case() const;
  // @@protoc_insertion_point(class_scope:xla.memory_space_assignment.MsaSortOrderOverrideOptions)
 private:
  class _Internal;
  void set_has_assign_first();
  void set_has_assign_last();
  void set_has_assign_value();
  inline bool has_options() const;
  inline void clear_has_options();
  friend class ::google::protobuf::internal::TcParser;
  static const ::google::protobuf::internal::TcParseTable<0, 3,
                                   0, 0,
                                   2>
      _table_;

  friend class ::google::protobuf::MessageLite;
  friend class ::google::protobuf::Arena;
  template <typename T>
  friend class ::google::protobuf::Arena::InternalHelper;
  using InternalArenaConstructable_ = void;
  using DestructorSkippable_ = void;
  struct Impl_ {
    inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept;
    inline explicit Impl_(
        ::google::protobuf::internal::InternalVisibility visibility,
        ::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
    inline explicit Impl_(
        ::google::protobuf::internal::InternalVisibility visibility,
        ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
        const MsaSortOrderOverrideOptions& from_msg);
    union OptionsUnion {
      constexpr OptionsUnion() : _constinit_{} {}
      ::google::protobuf::internal::ConstantInitialized _constinit_;
      bool assign_first_;
      bool assign_last_;
      ::int64_t assign_value_;
    } options_;
    ::google::protobuf::internal::CachedSize _cached_size_;
    ::uint32_t _oneof_case_[1];
    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_xla_2fservice_2fmemory_5fspace_5fassignment_2fmemory_5fspace_5fassignment_2eproto;
};

PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull MsaSortOrderOverrideOptions_class_data_;
// -------------------------------------------------------------------

class PROTOBUF_EXPORT MemoryBoundLoopOptimizerOptions final : public ::google::protobuf::Message
/* @@protoc_insertion_point(class_definition:xla.memory_space_assignment.MemoryBoundLoopOptimizerOptions) */ {
 public:
  inline MemoryBoundLoopOptimizerOptions() : MemoryBoundLoopOptimizerOptions(nullptr) {}
  ~MemoryBoundLoopOptimizerOptions() PROTOBUF_FINAL;

#if defined(PROTOBUF_CUSTOM_VTABLE)
  void operator delete(MemoryBoundLoopOptimizerOptions* PROTOBUF_NONNULL msg, std::destroying_delete_t) {
    SharedDtor(*msg);
    ::google::protobuf::internal::SizedDelete(msg, sizeof(MemoryBoundLoopOptimizerOptions));
  }
#endif

  template <typename = void>
  explicit PROTOBUF_CONSTEXPR MemoryBoundLoopOptimizerOptions(::google::protobuf::internal::ConstantInitialized);

  inline MemoryBoundLoopOptimizerOptions(const MemoryBoundLoopOptimizerOptions& from) : MemoryBoundLoopOptimizerOptions(nullptr, from) {}
  inline MemoryBoundLoopOptimizerOptions(MemoryBoundLoopOptimizerOptions&& from) noexcept
      : MemoryBoundLoopOptimizerOptions(nullptr, ::std::move(from)) {}
  inline MemoryBoundLoopOptimizerOptions& operator=(const MemoryBoundLoopOptimizerOptions& from) {
    CopyFrom(from);
    return *this;
  }
  inline MemoryBoundLoopOptimizerOptions& operator=(MemoryBoundLoopOptimizerOptions&& from) noexcept {
    if (this == &from) return *this;
    if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) {
      InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance);
  }
  inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields()
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>();
  }

  static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() {
    return GetDescriptor();
  }
  static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() {
    return default_instance().GetMetadata().descriptor;
  }
  static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() {
    return default_instance().GetMetadata().reflection;
  }
  static const MemoryBoundLoopOptimizerOptions& default_instance() {
    return *reinterpret_cast<const MemoryBoundLoopOptimizerOptions*>(
        &_MemoryBoundLoopOptimizerOptions_default_instance_);
  }
  static constexpr int kIndexInFileMessages = 1;
  friend void swap(MemoryBoundLoopOptimizerOptions& a, MemoryBoundLoopOptimizerOptions& b) { a.Swap(&b); }
  inline void Swap(MemoryBoundLoopOptimizerOptions* PROTOBUF_NONNULL other) {
    if (other == this) return;
    if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) {
      InternalSwap(other);
    } else {
      ::google::protobuf::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(MemoryBoundLoopOptimizerOptions* PROTOBUF_NONNULL other) {
    if (other == this) return;
    ABSL_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  MemoryBoundLoopOptimizerOptions* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const {
    return ::google::protobuf::Message::DefaultConstruct<MemoryBoundLoopOptimizerOptions>(arena);
  }
  using ::google::protobuf::Message::CopyFrom;
  void CopyFrom(const MemoryBoundLoopOptimizerOptions& from);
  using ::google::protobuf::Message::MergeFrom;
  void MergeFrom(const MemoryBoundLoopOptimizerOptions& from) { MemoryBoundLoopOptimizerOptions::MergeImpl(*this, from); }

  private:
  static void MergeImpl(::google::protobuf::MessageLite& to_msg,
                        const ::google::protobuf::MessageLite& from_msg);

  public:
  bool IsInitialized() const {
    return true;
  }
  ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL;
  #if defined(PROTOBUF_CUSTOM_VTABLE)
  private:
  static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg);
  static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream);

  public:
  ::size_t ByteSizeLong() const { return ByteSizeLong(*this); }
  ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
    return _InternalSerialize(*this, target, stream);
  }
  #else   // PROTOBUF_CUSTOM_VTABLE
  ::size_t ByteSizeLong() const final;
  ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final;
  #endif  // PROTOBUF_CUSTOM_VTABLE
  int GetCachedSize() const { return _impl_._cached_size_.Get(); }

  private:
  void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  static void SharedDtor(MessageLite& self);
  void InternalSwap(MemoryBoundLoopOptimizerOptions* PROTOBUF_NONNULL other);
 private:
  template <typename T>
  friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)();
  static ::absl::string_view FullMessageName() { return "xla.memory_space_assignment.MemoryBoundLoopOptimizerOptions"; }

 protected:
  explicit MemoryBoundLoopOptimizerOptions(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  MemoryBoundLoopOptimizerOptions(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const MemoryBoundLoopOptimizerOptions& from);
  MemoryBoundLoopOptimizerOptions(
      ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, MemoryBoundLoopOptimizerOptions&& from) noexcept
      : MemoryBoundLoopOptimizerOptions(arena) {
    *this = ::std::move(from);
  }
  const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL;
  static void* PROTOBUF_NONNULL PlacementNew_(
      const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
      ::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  static constexpr auto InternalNewImpl_();

 public:
  static constexpr auto InternalGenerateClassData_();

  ::google::protobuf::Metadata GetMetadata() const;
  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------
  enum : int {
    kDesiredCopyRatioFieldNumber = 2,
    kEnabledFieldNumber = 1,
    kAllowUnsatisfiedFullyPipelinedPrefetchFieldNumber = 3,
    kMinNumIterationsFieldNumber = 4,
  };
  // optional float desired_copy_ratio = 2;
  bool has_desired_copy_ratio() const;
  void clear_desired_copy_ratio() ;
  float desired_copy_ratio() const;
  void set_desired_copy_ratio(float value);

  private:
  float _internal_desired_copy_ratio() const;
  void _internal_set_desired_copy_ratio(float value);

  public:
  // optional bool enabled = 1;
  bool has_enabled() const;
  void clear_enabled() ;
  bool enabled() const;
  void set_enabled(bool value);

  private:
  bool _internal_enabled() const;
  void _internal_set_enabled(bool value);

  public:
  // optional bool allow_unsatisfied_fully_pipelined_prefetch = 3;
  bool has_allow_unsatisfied_fully_pipelined_prefetch() const;
  void clear_allow_unsatisfied_fully_pipelined_prefetch() ;
  bool allow_unsatisfied_fully_pipelined_prefetch() const;
  void set_allow_unsatisfied_fully_pipelined_prefetch(bool value);

  private:
  bool _internal_allow_unsatisfied_fully_pipelined_prefetch() const;
  void _internal_set_allow_unsatisfied_fully_pipelined_prefetch(bool value);

  public:
  // optional float min_num_iterations = 4;
  bool has_min_num_iterations() const;
  void clear_min_num_iterations() ;
  float min_num_iterations() const;
  void set_min_num_iterations(float value);

  private:
  float _internal_min_num_iterations() const;
  void _internal_set_min_num_iterations(float value);

  public:
  // @@protoc_insertion_point(class_scope:xla.memory_space_assignment.MemoryBoundLoopOptimizerOptions)
 private:
  class _Internal;
  friend class ::google::protobuf::internal::TcParser;
  static const ::google::protobuf::internal::TcParseTable<2, 4,
                                   0, 0,
                                   2>
      _table_;

  friend class ::google::protobuf::MessageLite;
  friend class ::google::protobuf::Arena;
  template <typename T>
  friend class ::google::protobuf::Arena::InternalHelper;
  using InternalArenaConstructable_ = void;
  using DestructorSkippable_ = void;
  struct Impl_ {
    inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept;
    inline explicit Impl_(
        ::google::protobuf::internal::InternalVisibility visibility,
        ::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
    inline explicit Impl_(
        ::google::protobuf::internal::InternalVisibility visibility,
        ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
        const MemoryBoundLoopOptimizerOptions& from_msg);
    ::google::protobuf::internal::HasBits<1> _has_bits_;
    ::google::protobuf::internal::CachedSize _cached_size_;
    float desired_copy_ratio_;
    bool enabled_;
    bool allow_unsatisfied_fully_pipelined_prefetch_;
    float min_num_iterations_;
    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_xla_2fservice_2fmemory_5fspace_5fassignment_2fmemory_5fspace_5fassignment_2eproto;
};

PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull MemoryBoundLoopOptimizerOptions_class_data_;
// -------------------------------------------------------------------

class PROTOBUF_EXPORT HloRandomFilter final : public ::google::protobuf::Message
/* @@protoc_insertion_point(class_definition:xla.memory_space_assignment.HloRandomFilter) */ {
 public:
  inline HloRandomFilter() : HloRandomFilter(nullptr) {}
  ~HloRandomFilter() PROTOBUF_FINAL;

#if defined(PROTOBUF_CUSTOM_VTABLE)
  void operator delete(HloRandomFilter* PROTOBUF_NONNULL msg, std::destroying_delete_t) {
    SharedDtor(*msg);
    ::google::protobuf::internal::SizedDelete(msg, sizeof(HloRandomFilter));
  }
#endif

  template <typename = void>
  explicit PROTOBUF_CONSTEXPR HloRandomFilter(::google::protobuf::internal::ConstantInitialized);

  inline HloRandomFilter(const HloRandomFilter& from) : HloRandomFilter(nullptr, from) {}
  inline HloRandomFilter(HloRandomFilter&& from) noexcept
      : HloRandomFilter(nullptr, ::std::move(from)) {}
  inline HloRandomFilter& operator=(const HloRandomFilter& from) {
    CopyFrom(from);
    return *this;
  }
  inline HloRandomFilter& operator=(HloRandomFilter&& from) noexcept {
    if (this == &from) return *this;
    if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) {
      InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance);
  }
  inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields()
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>();
  }

  static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() {
    return GetDescriptor();
  }
  static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() {
    return default_instance().GetMetadata().descriptor;
  }
  static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() {
    return default_instance().GetMetadata().reflection;
  }
  static const HloRandomFilter& default_instance() {
    return *reinterpret_cast<const HloRandomFilter*>(
        &_HloRandomFilter_default_instance_);
  }
  static constexpr int kIndexInFileMessages = 7;
  friend void swap(HloRandomFilter& a, HloRandomFilter& b) { a.Swap(&b); }
  inline void Swap(HloRandomFilter* PROTOBUF_NONNULL other) {
    if (other == this) return;
    if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) {
      InternalSwap(other);
    } else {
      ::google::protobuf::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(HloRandomFilter* PROTOBUF_NONNULL other) {
    if (other == this) return;
    ABSL_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  HloRandomFilter* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const {
    return ::google::protobuf::Message::DefaultConstruct<HloRandomFilter>(arena);
  }
  using ::google::protobuf::Message::CopyFrom;
  void CopyFrom(const HloRandomFilter& from);
  using ::google::protobuf::Message::MergeFrom;
  void MergeFrom(const HloRandomFilter& from) { HloRandomFilter::MergeImpl(*this, from); }

  private:
  static void MergeImpl(::google::protobuf::MessageLite& to_msg,
                        const ::google::protobuf::MessageLite& from_msg);

  public:
  bool IsInitialized() const {
    return true;
  }
  ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL;
  #if defined(PROTOBUF_CUSTOM_VTABLE)
  private:
  static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg);
  static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream);

  public:
  ::size_t ByteSizeLong() const { return ByteSizeLong(*this); }
  ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
    return _InternalSerialize(*this, target, stream);
  }
  #else   // PROTOBUF_CUSTOM_VTABLE
  ::size_t ByteSizeLong() const final;
  ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final;
  #endif  // PROTOBUF_CUSTOM_VTABLE
  int GetCachedSize() const { return _impl_._cached_size_.Get(); }

  private:
  void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  static void SharedDtor(MessageLite& self);
  void InternalSwap(HloRandomFilter* PROTOBUF_NONNULL other);
 private:
  template <typename T>
  friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)();
  static ::absl::string_view FullMessageName() { return "xla.memory_space_assignment.HloRandomFilter"; }

 protected:
  explicit HloRandomFilter(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  HloRandomFilter(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const HloRandomFilter& from);
  HloRandomFilter(
      ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, HloRandomFilter&& from) noexcept
      : HloRandomFilter(arena) {
    *this = ::std::move(from);
  }
  const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL;
  static void* PROTOBUF_NONNULL PlacementNew_(
      const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
      ::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  static constexpr auto InternalNewImpl_();

 public:
  static constexpr auto InternalGenerateClassData_();

  ::google::protobuf::Metadata GetMetadata() const;
  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------
  enum : int {
    kSeedFieldNumber = 1,
    kSelectionRangeBeginFieldNumber = 2,
    kSelectionRangeEndFieldNumber = 3,
  };
  // optional int64 seed = 1;
  bool has_seed() const;
  void clear_seed() ;
  ::int64_t seed() const;
  void set_seed(::int64_t value);

  private:
  ::int64_t _internal_seed() const;
  void _internal_set_seed(::int64_t value);

  public:
  // optional double selection_range_begin = 2;
  bool has_selection_range_begin() const;
  void clear_selection_range_begin() ;
  double selection_range_begin() const;
  void set_selection_range_begin(double value);

  private:
  double _internal_selection_range_begin() const;
  void _internal_set_selection_range_begin(double value);

  public:
  // optional double selection_range_end = 3;
  bool has_selection_range_end() const;
  void clear_selection_range_end() ;
  double selection_range_end() const;
  void set_selection_range_end(double value);

  private:
  double _internal_selection_range_end() const;
  void _internal_set_selection_range_end(double value);

  public:
  // @@protoc_insertion_point(class_scope:xla.memory_space_assignment.HloRandomFilter)
 private:
  class _Internal;
  friend class ::google::protobuf::internal::TcParser;
  static const ::google::protobuf::internal::TcParseTable<2, 3,
                                   0, 0,
                                   2>
      _table_;

  friend class ::google::protobuf::MessageLite;
  friend class ::google::protobuf::Arena;
  template <typename T>
  friend class ::google::protobuf::Arena::InternalHelper;
  using InternalArenaConstructable_ = void;
  using DestructorSkippable_ = void;
  struct Impl_ {
    inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept;
    inline explicit Impl_(
        ::google::protobuf::internal::InternalVisibility visibility,
        ::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
    inline explicit Impl_(
        ::google::protobuf::internal::InternalVisibility visibility,
        ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
        const HloRandomFilter& from_msg);
    ::google::protobuf::internal::HasBits<1> _has_bits_;
    ::google::protobuf::internal::CachedSize _cached_size_;
    ::int64_t seed_;
    double selection_range_begin_;
    double selection_range_end_;
    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_xla_2fservice_2fmemory_5fspace_5fassignment_2fmemory_5fspace_5fassignment_2eproto;
};

PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull HloRandomFilter_class_data_;
// -------------------------------------------------------------------

class PROTOBUF_EXPORT ExpandedScopedAlternateMemoryMode final : public ::google::protobuf::internal::ZeroFieldsBase
/* @@protoc_insertion_point(class_definition:xla.memory_space_assignment.ExpandedScopedAlternateMemoryMode) */ {
 public:
  inline ExpandedScopedAlternateMemoryMode() : ExpandedScopedAlternateMemoryMode(nullptr) {}

#if defined(PROTOBUF_CUSTOM_VTABLE)
  void operator delete(ExpandedScopedAlternateMemoryMode* PROTOBUF_NONNULL msg, std::destroying_delete_t) {
    SharedDtor(*msg);
    ::google::protobuf::internal::SizedDelete(msg, sizeof(ExpandedScopedAlternateMemoryMode));
  }
#endif

  template <typename = void>
  explicit PROTOBUF_CONSTEXPR ExpandedScopedAlternateMemoryMode(::google::protobuf::internal::ConstantInitialized);

  inline ExpandedScopedAlternateMemoryMode(const ExpandedScopedAlternateMemoryMode& from) : ExpandedScopedAlternateMemoryMode(nullptr, from) {}
  inline ExpandedScopedAlternateMemoryMode(ExpandedScopedAlternateMemoryMode&& from) noexcept
      : ExpandedScopedAlternateMemoryMode(nullptr, ::std::move(from)) {}
  inline ExpandedScopedAlternateMemoryMode& operator=(const ExpandedScopedAlternateMemoryMode& from) {
    CopyFrom(from);
    return *this;
  }
  inline ExpandedScopedAlternateMemoryMode& operator=(ExpandedScopedAlternateMemoryMode&& from) noexcept {
    if (this == &from) return *this;
    if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) {
      InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance);
  }
  inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields()
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>();
  }

  static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() {
    return GetDescriptor();
  }
  static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() {
    return default_instance().GetMetadata().descriptor;
  }
  static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() {
    return default_instance().GetMetadata().reflection;
  }
  static const ExpandedScopedAlternateMemoryMode& default_instance() {
    return *reinterpret_cast<const ExpandedScopedAlternateMemoryMode*>(
        &_ExpandedScopedAlternateMemoryMode_default_instance_);
  }
  static constexpr int kIndexInFileMessages = 12;
  friend void swap(ExpandedScopedAlternateMemoryMode& a, ExpandedScopedAlternateMemoryMode& b) { a.Swap(&b); }
  inline void Swap(ExpandedScopedAlternateMemoryMode* PROTOBUF_NONNULL other) {
    if (other == this) return;
    if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) {
      InternalSwap(other);
    } else {
      ::google::protobuf::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(ExpandedScopedAlternateMemoryMode* PROTOBUF_NONNULL other) {
    if (other == this) return;
    ABSL_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  ExpandedScopedAlternateMemoryMode* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const {
    return ::google::protobuf::internal::ZeroFieldsBase::DefaultConstruct<ExpandedScopedAlternateMemoryMode>(arena);
  }
  using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom;
  inline void CopyFrom(const ExpandedScopedAlternateMemoryMode& from) {
    ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from);
  }
  using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom;
  void MergeFrom(const ExpandedScopedAlternateMemoryMode& from) {
    ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from);
  }

  public:
  bool IsInitialized() const {
    return true;
  }
 private:
  template <typename T>
  friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)();
  static ::absl::string_view FullMessageName() { return "xla.memory_space_assignment.ExpandedScopedAlternateMemoryMode"; }

 protected:
  explicit ExpandedScopedAlternateMemoryMode(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  ExpandedScopedAlternateMemoryMode(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ExpandedScopedAlternateMemoryMode& from);
  ExpandedScopedAlternateMemoryMode(
      ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ExpandedScopedAlternateMemoryMode&& from) noexcept
      : ExpandedScopedAlternateMemoryMode(arena) {
    *this = ::std::move(from);
  }
  const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL;
  static void* PROTOBUF_NONNULL PlacementNew_(
      const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
      ::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  static constexpr auto InternalNewImpl_();

 public:
  static constexpr auto InternalGenerateClassData_();

  ::google::protobuf::Metadata GetMetadata() const;
  // nested types ----------------------------------------------------
  using Value = ExpandedScopedAlternateMemoryMode_Value;
  static constexpr Value UNDEFINED = ExpandedScopedAlternateMemoryMode_Value_UNDEFINED;
  static constexpr Value DISABLED = ExpandedScopedAlternateMemoryMode_Value_DISABLED;
  static constexpr Value ENABLED = ExpandedScopedAlternateMemoryMode_Value_ENABLED;
  static inline bool Value_IsValid(int value) {
    return ExpandedScopedAlternateMemoryMode_Value_IsValid(value);
  }
  static constexpr Value Value_MIN = ExpandedScopedAlternateMemoryMode_Value_Value_MIN;
  static constexpr Value Value_MAX = ExpandedScopedAlternateMemoryMode_Value_Value_MAX;
  static constexpr int Value_ARRAYSIZE = ExpandedScopedAlternateMemoryMode_Value_Value_ARRAYSIZE;
  static inline const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL Value_descriptor() {
    return ExpandedScopedAlternateMemoryMode_Value_descriptor();
  }
  template <typename T>
  static inline const ::std::string& Value_Name(T value) {
    return ExpandedScopedAlternateMemoryMode_Value_Name(value);
  }
  static inline bool Value_Parse(
      ::absl::string_view name, Value* PROTOBUF_NONNULL value) {
    return ExpandedScopedAlternateMemoryMode_Value_Parse(name, value);
  }

  // accessors -------------------------------------------------------
  // @@protoc_insertion_point(class_scope:xla.memory_space_assignment.ExpandedScopedAlternateMemoryMode)
 private:
  class _Internal;
  friend class ::google::protobuf::internal::TcParser;
  static const ::google::protobuf::internal::TcParseTable<0, 0,
                                   0, 0,
                                   2>
      _table_;

  friend class ::google::protobuf::MessageLite;
  friend class ::google::protobuf::Arena;
  template <typename T>
  friend class ::google::protobuf::Arena::InternalHelper;
  using InternalArenaConstructable_ = void;
  using DestructorSkippable_ = void;
  struct Impl_ {
    inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept;
    inline explicit Impl_(
        ::google::protobuf::internal::InternalVisibility visibility,
        ::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
    inline explicit Impl_(
        ::google::protobuf::internal::InternalVisibility visibility,
        ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
        const ExpandedScopedAlternateMemoryMode& from_msg);
    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  friend struct ::TableStruct_xla_2fservice_2fmemory_5fspace_5fassignment_2fmemory_5fspace_5fassignment_2eproto;
};

PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull ExpandedScopedAlternateMemoryMode_class_data_;
// -------------------------------------------------------------------

class PROTOBUF_EXPORT HloOperandFilter final : public ::google::protobuf::Message
/* @@protoc_insertion_point(class_definition:xla.memory_space_assignment.HloOperandFilter) */ {
 public:
  inline HloOperandFilter() : HloOperandFilter(nullptr) {}
  ~HloOperandFilter() PROTOBUF_FINAL;

#if defined(PROTOBUF_CUSTOM_VTABLE)
  void operator delete(HloOperandFilter* PROTOBUF_NONNULL msg, std::destroying_delete_t) {
    SharedDtor(*msg);
    ::google::protobuf::internal::SizedDelete(msg, sizeof(HloOperandFilter));
  }
#endif

  template <typename = void>
  explicit PROTOBUF_CONSTEXPR HloOperandFilter(::google::protobuf::internal::ConstantInitialized);

  inline HloOperandFilter(const HloOperandFilter& from) : HloOperandFilter(nullptr, from) {}
  inline HloOperandFilter(HloOperandFilter&& from) noexcept
      : HloOperandFilter(nullptr, ::std::move(from)) {}
  inline HloOperandFilter& operator=(const HloOperandFilter& from) {
    CopyFrom(from);
    return *this;
  }
  inline HloOperandFilter& operator=(HloOperandFilter&& from) noexcept {
    if (this == &from) return *this;
    if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) {
      InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance);
  }
  inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields()
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>();
  }

  static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() {
    return GetDescriptor();
  }
  static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() {
    return default_instance().GetMetadata().descriptor;
  }
  static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() {
    return default_instance().GetMetadata().reflection;
  }
  static const HloOperandFilter& default_instance() {
    return *reinterpret_cast<const HloOperandFilter*>(
        &_HloOperandFilter_default_instance_);
  }
  static constexpr int kIndexInFileMessages = 3;
  friend void swap(HloOperandFilter& a, HloOperandFilter& b) { a.Swap(&b); }
  inline void Swap(HloOperandFilter* PROTOBUF_NONNULL other) {
    if (other == this) return;
    if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) {
      InternalSwap(other);
    } else {
      ::google::protobuf::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(HloOperandFilter* PROTOBUF_NONNULL other) {
    if (other == this) return;
    ABSL_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  HloOperandFilter* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const {
    return ::google::protobuf::Message::DefaultConstruct<HloOperandFilter>(arena);
  }
  using ::google::protobuf::Message::CopyFrom;
  void CopyFrom(const HloOperandFilter& from);
  using ::google::protobuf::Message::MergeFrom;
  void MergeFrom(const HloOperandFilter& from) { HloOperandFilter::MergeImpl(*this, from); }

  private:
  static void MergeImpl(::google::protobuf::MessageLite& to_msg,
                        const ::google::protobuf::MessageLite& from_msg);

  public:
  bool IsInitialized() const {
    return true;
  }
  ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL;
  #if defined(PROTOBUF_CUSTOM_VTABLE)
  private:
  static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg);
  static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream);

  public:
  ::size_t ByteSizeLong() const { return ByteSizeLong(*this); }
  ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
    return _InternalSerialize(*this, target, stream);
  }
  #else   // PROTOBUF_CUSTOM_VTABLE
  ::size_t ByteSizeLong() const final;
  ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final;
  #endif  // PROTOBUF_CUSTOM_VTABLE
  int GetCachedSize() const { return _impl_._cached_size_.Get(); }

  private:
  void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  static void SharedDtor(MessageLite& self);
  void InternalSwap(HloOperandFilter* PROTOBUF_NONNULL other);
 private:
  template <typename T>
  friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)();
  static ::absl::string_view FullMessageName() { return "xla.memory_space_assignment.HloOperandFilter"; }

 protected:
  explicit HloOperandFilter(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  HloOperandFilter(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const HloOperandFilter& from);
  HloOperandFilter(
      ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, HloOperandFilter&& from) noexcept
      : HloOperandFilter(arena) {
    *this = ::std::move(from);
  }
  const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL;
  static void* PROTOBUF_NONNULL PlacementNew_(
      const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
      ::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  static constexpr auto InternalNewImpl_();

 public:
  static constexpr auto InternalGenerateClassData_();

  ::google::protobuf::Metadata GetMetadata() const;
  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------
  enum : int {
    kInstructionNameRegexFieldNumber = 1,
    kInstructionRegexFieldNumber = 6,
    kTupleIndexFieldNumber = 5,
    kOperandNumberFieldNumber = 2,
    kSizeGteFieldNumber = 3,
    kSizeLteFieldNumber = 4,
  };
  // optional string instruction_name_regex = 1;
  bool has_instruction_name_regex() const;
  void clear_instruction_name_regex() ;
  const ::std::string& instruction_name_regex() const;
  template <typename Arg_ = const ::std::string&, typename... Args_>
  void set_instruction_name_regex(Arg_&& arg, Args_... args);
  ::std::string* PROTOBUF_NONNULL mutable_instruction_name_regex();
  [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_instruction_name_regex();
  void set_allocated_instruction_name_regex(::std::string* PROTOBUF_NULLABLE value);

  private:
  const ::std::string& _internal_instruction_name_regex() const;
  PROTOBUF_ALWAYS_INLINE void _internal_set_instruction_name_regex(const ::std::string& value);
  ::std::string* PROTOBUF_NONNULL _internal_mutable_instruction_name_regex();

  public:
  // optional string instruction_regex = 6;
  bool has_instruction_regex() const;
  void clear_instruction_regex() ;
  const ::std::string& instruction_regex() const;
  template <typename Arg_ = const ::std::string&, typename... Args_>
  void set_instruction_regex(Arg_&& arg, Args_... args);
  ::std::string* PROTOBUF_NONNULL mutable_instruction_regex();
  [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_instruction_regex();
  void set_allocated_instruction_regex(::std::string* PROTOBUF_NULLABLE value);

  private:
  const ::std::string& _internal_instruction_regex() const;
  PROTOBUF_ALWAYS_INLINE void _internal_set_instruction_regex(const ::std::string& value);
  ::std::string* PROTOBUF_NONNULL _internal_mutable_instruction_regex();

  public:
  // optional .xla.memory_space_assignment.TupleShapeIndex tuple_index = 5;
  bool has_tuple_index() const;
  void clear_tuple_index() ;
  const ::xla::memory_space_assignment::TupleShapeIndex& tuple_index() const;
  [[nodiscard]] ::xla::memory_space_assignment::TupleShapeIndex* PROTOBUF_NULLABLE release_tuple_index();
  ::xla::memory_space_assignment::TupleShapeIndex* PROTOBUF_NONNULL mutable_tuple_index();
  void set_allocated_tuple_index(::xla::memory_space_assignment::TupleShapeIndex* PROTOBUF_NULLABLE value);
  void unsafe_arena_set_allocated_tuple_index(::xla::memory_space_assignment::TupleShapeIndex* PROTOBUF_NULLABLE value);
  ::xla::memory_space_assignment::TupleShapeIndex* PROTOBUF_NULLABLE unsafe_arena_release_tuple_index();

  private:
  const ::xla::memory_space_assignment::TupleShapeIndex& _internal_tuple_index() const;
  ::xla::memory_space_assignment::TupleShapeIndex* PROTOBUF_NONNULL _internal_mutable_tuple_index();

  public:
  // optional int64 operand_number = 2;
  bool has_operand_number() const;
  void clear_operand_number() ;
  ::int64_t operand_number() const;
  void set_operand_number(::int64_t value);

  private:
  ::int64_t _internal_operand_number() const;
  void _internal_set_operand_number(::int64_t value);

  public:
  // optional int64 size_gte = 3;
  bool has_size_gte() const;
  void clear_size_gte() ;
  ::int64_t size_gte() const;
  void set_size_gte(::int64_t value);

  private:
  ::int64_t _internal_size_gte() const;
  void _internal_set_size_gte(::int64_t value);

  public:
  // optional int64 size_lte = 4;
  bool has_size_lte() const;
  void clear_size_lte() ;
  ::int64_t size_lte() const;
  void set_size_lte(::int64_t value);

  private:
  ::int64_t _internal_size_lte() const;
  void _internal_set_size_lte(::int64_t value);

  public:
  // @@protoc_insertion_point(class_scope:xla.memory_space_assignment.HloOperandFilter)
 private:
  class _Internal;
  friend class ::google::protobuf::internal::TcParser;
  static const ::google::protobuf::internal::TcParseTable<3, 6,
                                   1, 92,
                                   2>
      _table_;

  friend class ::google::protobuf::MessageLite;
  friend class ::google::protobuf::Arena;
  template <typename T>
  friend class ::google::protobuf::Arena::InternalHelper;
  using InternalArenaConstructable_ = void;
  using DestructorSkippable_ = void;
  struct Impl_ {
    inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept;
    inline explicit Impl_(
        ::google::protobuf::internal::InternalVisibility visibility,
        ::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
    inline explicit Impl_(
        ::google::protobuf::internal::InternalVisibility visibility,
        ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
        const HloOperandFilter& from_msg);
    ::google::protobuf::internal::HasBits<1> _has_bits_;
    ::google::protobuf::internal::CachedSize _cached_size_;
    ::google::protobuf::internal::ArenaStringPtr instruction_name_regex_;
    ::google::protobuf::internal::ArenaStringPtr instruction_regex_;
    ::xla::memory_space_assignment::TupleShapeIndex* PROTOBUF_NULLABLE tuple_index_;
    ::int64_t operand_number_;
    ::int64_t size_gte_;
    ::int64_t size_lte_;
    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_xla_2fservice_2fmemory_5fspace_5fassignment_2fmemory_5fspace_5fassignment_2eproto;
};

PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull HloOperandFilter_class_data_;
// -------------------------------------------------------------------

class PROTOBUF_EXPORT HloPositionMatcher final : public ::google::protobuf::Message
/* @@protoc_insertion_point(class_definition:xla.memory_space_assignment.HloPositionMatcher) */ {
 public:
  inline HloPositionMatcher() : HloPositionMatcher(nullptr) {}
  ~HloPositionMatcher() PROTOBUF_FINAL;

#if defined(PROTOBUF_CUSTOM_VTABLE)
  void operator delete(HloPositionMatcher* PROTOBUF_NONNULL msg, std::destroying_delete_t) {
    SharedDtor(*msg);
    ::google::protobuf::internal::SizedDelete(msg, sizeof(HloPositionMatcher));
  }
#endif

  template <typename = void>
  explicit PROTOBUF_CONSTEXPR HloPositionMatcher(::google::protobuf::internal::ConstantInitialized);

  inline HloPositionMatcher(const HloPositionMatcher& from) : HloPositionMatcher(nullptr, from) {}
  inline HloPositionMatcher(HloPositionMatcher&& from) noexcept
      : HloPositionMatcher(nullptr, ::std::move(from)) {}
  inline HloPositionMatcher& operator=(const HloPositionMatcher& from) {
    CopyFrom(from);
    return *this;
  }
  inline HloPositionMatcher& operator=(HloPositionMatcher&& from) noexcept {
    if (this == &from) return *this;
    if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) {
      InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance);
  }
  inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields()
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>();
  }

  static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() {
    return GetDescriptor();
  }
  static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() {
    return default_instance().GetMetadata().descriptor;
  }
  static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() {
    return default_instance().GetMetadata().reflection;
  }
  static const HloPositionMatcher& default_instance() {
    return *reinterpret_cast<const HloPositionMatcher*>(
        &_HloPositionMatcher_default_instance_);
  }
  static constexpr int kIndexInFileMessages = 8;
  friend void swap(HloPositionMatcher& a, HloPositionMatcher& b) { a.Swap(&b); }
  inline void Swap(HloPositionMatcher* PROTOBUF_NONNULL other) {
    if (other == this) return;
    if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) {
      InternalSwap(other);
    } else {
      ::google::protobuf::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(HloPositionMatcher* PROTOBUF_NONNULL other) {
    if (other == this) return;
    ABSL_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  HloPositionMatcher* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const {
    return ::google::protobuf::Message::DefaultConstruct<HloPositionMatcher>(arena);
  }
  using ::google::protobuf::Message::CopyFrom;
  void CopyFrom(const HloPositionMatcher& from);
  using ::google::protobuf::Message::MergeFrom;
  void MergeFrom(const HloPositionMatcher& from) { HloPositionMatcher::MergeImpl(*this, from); }

  private:
  static void MergeImpl(::google::protobuf::MessageLite& to_msg,
                        const ::google::protobuf::MessageLite& from_msg);

  public:
  bool IsInitialized() const {
    return true;
  }
  ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL;
  #if defined(PROTOBUF_CUSTOM_VTABLE)
  private:
  static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg);
  static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream);

  public:
  ::size_t ByteSizeLong() const { return ByteSizeLong(*this); }
  ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
    return _InternalSerialize(*this, target, stream);
  }
  #else   // PROTOBUF_CUSTOM_VTABLE
  ::size_t ByteSizeLong() const final;
  ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final;
  #endif  // PROTOBUF_CUSTOM_VTABLE
  int GetCachedSize() const { return _impl_._cached_size_.Get(); }

  private:
  void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  static void SharedDtor(MessageLite& self);
  void InternalSwap(HloPositionMatcher* PROTOBUF_NONNULL other);
 private:
  template <typename T>
  friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)();
  static ::absl::string_view FullMessageName() { return "xla.memory_space_assignment.HloPositionMatcher"; }

 protected:
  explicit HloPositionMatcher(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  HloPositionMatcher(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const HloPositionMatcher& from);
  HloPositionMatcher(
      ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, HloPositionMatcher&& from) noexcept
      : HloPositionMatcher(arena) {
    *this = ::std::move(from);
  }
  const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL;
  static void* PROTOBUF_NONNULL PlacementNew_(
      const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
      ::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  static constexpr auto InternalNewImpl_();

 public:
  static constexpr auto InternalGenerateClassData_();

  ::google::protobuf::Metadata GetMetadata() const;
  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------
  enum : int {
    kInstructionRegexFieldNumber = 1,
    kInstructionNameRegexFieldNumber = 2,
    kTupleIndexFieldNumber = 3,
    kHloUseFilterFieldNumber = 6,
    kHloRandomFilterFieldNumber = 7,
    kSizeGteFieldNumber = 4,
    kSizeLteFieldNumber = 5,
  };
  // optional string instruction_regex = 1;
  bool has_instruction_regex() const;
  void clear_instruction_regex() ;
  const ::std::string& instruction_regex() const;
  template <typename Arg_ = const ::std::string&, typename... Args_>
  void set_instruction_regex(Arg_&& arg, Args_... args);
  ::std::string* PROTOBUF_NONNULL mutable_instruction_regex();
  [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_instruction_regex();
  void set_allocated_instruction_regex(::std::string* PROTOBUF_NULLABLE value);

  private:
  const ::std::string& _internal_instruction_regex() const;
  PROTOBUF_ALWAYS_INLINE void _internal_set_instruction_regex(const ::std::string& value);
  ::std::string* PROTOBUF_NONNULL _internal_mutable_instruction_regex();

  public:
  // optional string instruction_name_regex = 2;
  bool has_instruction_name_regex() const;
  void clear_instruction_name_regex() ;
  const ::std::string& instruction_name_regex() const;
  template <typename Arg_ = const ::std::string&, typename... Args_>
  void set_instruction_name_regex(Arg_&& arg, Args_... args);
  ::std::string* PROTOBUF_NONNULL mutable_instruction_name_regex();
  [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_instruction_name_regex();
  void set_allocated_instruction_name_regex(::std::string* PROTOBUF_NULLABLE value);

  private:
  const ::std::string& _internal_instruction_name_regex() const;
  PROTOBUF_ALWAYS_INLINE void _internal_set_instruction_name_regex(const ::std::string& value);
  ::std::string* PROTOBUF_NONNULL _internal_mutable_instruction_name_regex();

  public:
  // optional .xla.memory_space_assignment.TupleShapeIndex tuple_index = 3;
  bool has_tuple_index() const;
  void clear_tuple_index() ;
  const ::xla::memory_space_assignment::TupleShapeIndex& tuple_index() const;
  [[nodiscard]] ::xla::memory_space_assignment::TupleShapeIndex* PROTOBUF_NULLABLE release_tuple_index();
  ::xla::memory_space_assignment::TupleShapeIndex* PROTOBUF_NONNULL mutable_tuple_index();
  void set_allocated_tuple_index(::xla::memory_space_assignment::TupleShapeIndex* PROTOBUF_NULLABLE value);
  void unsafe_arena_set_allocated_tuple_index(::xla::memory_space_assignment::TupleShapeIndex* PROTOBUF_NULLABLE value);
  ::xla::memory_space_assignment::TupleShapeIndex* PROTOBUF_NULLABLE unsafe_arena_release_tuple_index();

  private:
  const ::xla::memory_space_assignment::TupleShapeIndex& _internal_tuple_index() const;
  ::xla::memory_space_assignment::TupleShapeIndex* PROTOBUF_NONNULL _internal_mutable_tuple_index();

  public:
  // optional .xla.memory_space_assignment.HloOperandFilter hlo_use_filter = 6;
  bool has_hlo_use_filter() const;
  void clear_hlo_use_filter() ;
  const ::xla::memory_space_assignment::HloOperandFilter& hlo_use_filter() const;
  [[nodiscard]] ::xla::memory_space_assignment::HloOperandFilter* PROTOBUF_NULLABLE release_hlo_use_filter();
  ::xla::memory_space_assignment::HloOperandFilter* PROTOBUF_NONNULL mutable_hlo_use_filter();
  void set_allocated_hlo_use_filter(::xla::memory_space_assignment::HloOperandFilter* PROTOBUF_NULLABLE value);
  void unsafe_arena_set_allocated_hlo_use_filter(::xla::memory_space_assignment::HloOperandFilter* PROTOBUF_NULLABLE value);
  ::xla::memory_space_assignment::HloOperandFilter* PROTOBUF_NULLABLE unsafe_arena_release_hlo_use_filter();

  private:
  const ::xla::memory_space_assignment::HloOperandFilter& _internal_hlo_use_filter() const;
  ::xla::memory_space_assignment::HloOperandFilter* PROTOBUF_NONNULL _internal_mutable_hlo_use_filter();

  public:
  // optional .xla.memory_space_assignment.HloRandomFilter hlo_random_filter = 7;
  bool has_hlo_random_filter() const;
  void clear_hlo_random_filter() ;
  const ::xla::memory_space_assignment::HloRandomFilter& hlo_random_filter() const;
  [[nodiscard]] ::xla::memory_space_assignment::HloRandomFilter* PROTOBUF_NULLABLE release_hlo_random_filter();
  ::xla::memory_space_assignment::HloRandomFilter* PROTOBUF_NONNULL mutable_hlo_random_filter();
  void set_allocated_hlo_random_filter(::xla::memory_space_assignment::HloRandomFilter* PROTOBUF_NULLABLE value);
  void unsafe_arena_set_allocated_hlo_random_filter(::xla::memory_space_assignment::HloRandomFilter* PROTOBUF_NULLABLE value);
  ::xla::memory_space_assignment::HloRandomFilter* PROTOBUF_NULLABLE unsafe_arena_release_hlo_random_filter();

  private:
  const ::xla::memory_space_assignment::HloRandomFilter& _internal_hlo_random_filter() const;
  ::xla::memory_space_assignment::HloRandomFilter* PROTOBUF_NONNULL _internal_mutable_hlo_random_filter();

  public:
  // optional int64 size_gte = 4;
  bool has_size_gte() const;
  void clear_size_gte() ;
  ::int64_t size_gte() const;
  void set_size_gte(::int64_t value);

  private:
  ::int64_t _internal_size_gte() const;
  void _internal_set_size_gte(::int64_t value);

  public:
  // optional int64 size_lte = 5;
  bool has_size_lte() const;
  void clear_size_lte() ;
  ::int64_t size_lte() const;
  void set_size_lte(::int64_t value);

  private:
  ::int64_t _internal_size_lte() const;
  void _internal_set_size_lte(::int64_t value);

  public:
  // @@protoc_insertion_point(class_scope:xla.memory_space_assignment.HloPositionMatcher)
 private:
  class _Internal;
  friend class ::google::protobuf::internal::TcParser;
  static const ::google::protobuf::internal::TcParseTable<3, 7,
                                   3, 94,
                                   2>
      _table_;

  friend class ::google::protobuf::MessageLite;
  friend class ::google::protobuf::Arena;
  template <typename T>
  friend class ::google::protobuf::Arena::InternalHelper;
  using InternalArenaConstructable_ = void;
  using DestructorSkippable_ = void;
  struct Impl_ {
    inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept;
    inline explicit Impl_(
        ::google::protobuf::internal::InternalVisibility visibility,
        ::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
    inline explicit Impl_(
        ::google::protobuf::internal::InternalVisibility visibility,
        ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
        const HloPositionMatcher& from_msg);
    ::google::protobuf::internal::HasBits<1> _has_bits_;
    ::google::protobuf::internal::CachedSize _cached_size_;
    ::google::protobuf::internal::ArenaStringPtr instruction_regex_;
    ::google::protobuf::internal::ArenaStringPtr instruction_name_regex_;
    ::xla::memory_space_assignment::TupleShapeIndex* PROTOBUF_NULLABLE tuple_index_;
    ::xla::memory_space_assignment::HloOperandFilter* PROTOBUF_NULLABLE hlo_use_filter_;
    ::xla::memory_space_assignment::HloRandomFilter* PROTOBUF_NULLABLE hlo_random_filter_;
    ::int64_t size_gte_;
    ::int64_t size_lte_;
    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_xla_2fservice_2fmemory_5fspace_5fassignment_2fmemory_5fspace_5fassignment_2eproto;
};

PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull HloPositionMatcher_class_data_;
// -------------------------------------------------------------------

class PROTOBUF_EXPORT PreferredPrefetchOverrideOptions final : public ::google::protobuf::Message
/* @@protoc_insertion_point(class_definition:xla.memory_space_assignment.PreferredPrefetchOverrideOptions) */ {
 public:
  inline PreferredPrefetchOverrideOptions() : PreferredPrefetchOverrideOptions(nullptr) {}
  ~PreferredPrefetchOverrideOptions() PROTOBUF_FINAL;

#if defined(PROTOBUF_CUSTOM_VTABLE)
  void operator delete(PreferredPrefetchOverrideOptions* PROTOBUF_NONNULL msg, std::destroying_delete_t) {
    SharedDtor(*msg);
    ::google::protobuf::internal::SizedDelete(msg, sizeof(PreferredPrefetchOverrideOptions));
  }
#endif

  template <typename = void>
  explicit PROTOBUF_CONSTEXPR PreferredPrefetchOverrideOptions(::google::protobuf::internal::ConstantInitialized);

  inline PreferredPrefetchOverrideOptions(const PreferredPrefetchOverrideOptions& from) : PreferredPrefetchOverrideOptions(nullptr, from) {}
  inline PreferredPrefetchOverrideOptions(PreferredPrefetchOverrideOptions&& from) noexcept
      : PreferredPrefetchOverrideOptions(nullptr, ::std::move(from)) {}
  inline PreferredPrefetchOverrideOptions& operator=(const PreferredPrefetchOverrideOptions& from) {
    CopyFrom(from);
    return *this;
  }
  inline PreferredPrefetchOverrideOptions& operator=(PreferredPrefetchOverrideOptions&& from) noexcept {
    if (this == &from) return *this;
    if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) {
      InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance);
  }
  inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields()
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>();
  }

  static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() {
    return GetDescriptor();
  }
  static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() {
    return default_instance().GetMetadata().descriptor;
  }
  static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() {
    return default_instance().GetMetadata().reflection;
  }
  static const PreferredPrefetchOverrideOptions& default_instance() {
    return *reinterpret_cast<const PreferredPrefetchOverrideOptions*>(
        &_PreferredPrefetchOverrideOptions_default_instance_);
  }
  enum OptionsCase {
    kPrefetchEagerness = 1,
    kAfterInstruction = 4,
    kBeforeInstruction = 5,
    OPTIONS_NOT_SET = 0,
  };
  static constexpr int kIndexInFileMessages = 4;
  friend void swap(PreferredPrefetchOverrideOptions& a, PreferredPrefetchOverrideOptions& b) { a.Swap(&b); }
  inline void Swap(PreferredPrefetchOverrideOptions* PROTOBUF_NONNULL other) {
    if (other == this) return;
    if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) {
      InternalSwap(other);
    } else {
      ::google::protobuf::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(PreferredPrefetchOverrideOptions* PROTOBUF_NONNULL other) {
    if (other == this) return;
    ABSL_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  PreferredPrefetchOverrideOptions* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const {
    return ::google::protobuf::Message::DefaultConstruct<PreferredPrefetchOverrideOptions>(arena);
  }
  using ::google::protobuf::Message::CopyFrom;
  void CopyFrom(const PreferredPrefetchOverrideOptions& from);
  using ::google::protobuf::Message::MergeFrom;
  void MergeFrom(const PreferredPrefetchOverrideOptions& from) { PreferredPrefetchOverrideOptions::MergeImpl(*this, from); }

  private:
  static void MergeImpl(::google::protobuf::MessageLite& to_msg,
                        const ::google::protobuf::MessageLite& from_msg);

  public:
  bool IsInitialized() const {
    return true;
  }
  ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL;
  #if defined(PROTOBUF_CUSTOM_VTABLE)
  private:
  static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg);
  static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream);

  public:
  ::size_t ByteSizeLong() const { return ByteSizeLong(*this); }
  ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
    return _InternalSerialize(*this, target, stream);
  }
  #else   // PROTOBUF_CUSTOM_VTABLE
  ::size_t ByteSizeLong() const final;
  ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final;
  #endif  // PROTOBUF_CUSTOM_VTABLE
  int GetCachedSize() const { return _impl_._cached_size_.Get(); }

  private:
  void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  static void SharedDtor(MessageLite& self);
  void InternalSwap(PreferredPrefetchOverrideOptions* PROTOBUF_NONNULL other);
 private:
  template <typename T>
  friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)();
  static ::absl::string_view FullMessageName() { return "xla.memory_space_assignment.PreferredPrefetchOverrideOptions"; }

 protected:
  explicit PreferredPrefetchOverrideOptions(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  PreferredPrefetchOverrideOptions(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const PreferredPrefetchOverrideOptions& from);
  PreferredPrefetchOverrideOptions(
      ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, PreferredPrefetchOverrideOptions&& from) noexcept
      : PreferredPrefetchOverrideOptions(arena) {
    *this = ::std::move(from);
  }
  const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL;
  static void* PROTOBUF_NONNULL PlacementNew_(
      const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
      ::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  static constexpr auto InternalNewImpl_();

 public:
  static constexpr auto InternalGenerateClassData_();

  ::google::protobuf::Metadata GetMetadata() const;
  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------
  enum : int {
    kPrefetchEagernessFieldNumber = 1,
    kAfterInstructionFieldNumber = 4,
    kBeforeInstructionFieldNumber = 5,
  };
  // float prefetch_eagerness = 1;
  bool has_prefetch_eagerness() const;
  void clear_prefetch_eagerness() ;
  float prefetch_eagerness() const;
  void set_prefetch_eagerness(float value);

  private:
  float _internal_prefetch_eagerness() const;
  void _internal_set_prefetch_eagerness(float value);

  public:
  // .xla.memory_space_assignment.HloPositionMatcher after_instruction = 4;
  bool has_after_instruction() const;
  private:
  bool _internal_has_after_instruction() const;

  public:
  void clear_after_instruction() ;
  const ::xla::memory_space_assignment::HloPositionMatcher& after_instruction() const;
  [[nodiscard]] ::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NULLABLE release_after_instruction();
  ::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NONNULL mutable_after_instruction();
  void set_allocated_after_instruction(::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NULLABLE value);
  void unsafe_arena_set_allocated_after_instruction(::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NULLABLE value);
  ::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NULLABLE unsafe_arena_release_after_instruction();

  private:
  const ::xla::memory_space_assignment::HloPositionMatcher& _internal_after_instruction() const;
  ::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NONNULL _internal_mutable_after_instruction();

  public:
  // .xla.memory_space_assignment.HloPositionMatcher before_instruction = 5;
  bool has_before_instruction() const;
  private:
  bool _internal_has_before_instruction() const;

  public:
  void clear_before_instruction() ;
  const ::xla::memory_space_assignment::HloPositionMatcher& before_instruction() const;
  [[nodiscard]] ::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NULLABLE release_before_instruction();
  ::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NONNULL mutable_before_instruction();
  void set_allocated_before_instruction(::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NULLABLE value);
  void unsafe_arena_set_allocated_before_instruction(::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NULLABLE value);
  ::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NULLABLE unsafe_arena_release_before_instruction();

  private:
  const ::xla::memory_space_assignment::HloPositionMatcher& _internal_before_instruction() const;
  ::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NONNULL _internal_mutable_before_instruction();

  public:
  void clear_options();
  OptionsCase options_case() const;
  // @@protoc_insertion_point(class_scope:xla.memory_space_assignment.PreferredPrefetchOverrideOptions)
 private:
  class _Internal;
  void set_has_prefetch_eagerness();
  void set_has_after_instruction();
  void set_has_before_instruction();
  inline bool has_options() const;
  inline void clear_has_options();
  friend class ::google::protobuf::internal::TcParser;
  static const ::google::protobuf::internal::TcParseTable<0, 3,
                                   2, 0,
                                   2>
      _table_;

  friend class ::google::protobuf::MessageLite;
  friend class ::google::protobuf::Arena;
  template <typename T>
  friend class ::google::protobuf::Arena::InternalHelper;
  using InternalArenaConstructable_ = void;
  using DestructorSkippable_ = void;
  struct Impl_ {
    inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept;
    inline explicit Impl_(
        ::google::protobuf::internal::InternalVisibility visibility,
        ::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
    inline explicit Impl_(
        ::google::protobuf::internal::InternalVisibility visibility,
        ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
        const PreferredPrefetchOverrideOptions& from_msg);
    union OptionsUnion {
      constexpr OptionsUnion() : _constinit_{} {}
      ::google::protobuf::internal::ConstantInitialized _constinit_;
      float prefetch_eagerness_;
      ::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NULLABLE after_instruction_;
      ::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NULLABLE before_instruction_;
    } options_;
    ::google::protobuf::internal::CachedSize _cached_size_;
    ::uint32_t _oneof_case_[1];
    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_xla_2fservice_2fmemory_5fspace_5fassignment_2fmemory_5fspace_5fassignment_2eproto;
};

PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull PreferredPrefetchOverrideOptions_class_data_;
// -------------------------------------------------------------------

class PROTOBUF_EXPORT MsaSortOrderOverride final : public ::google::protobuf::Message
/* @@protoc_insertion_point(class_definition:xla.memory_space_assignment.MsaSortOrderOverride) */ {
 public:
  inline MsaSortOrderOverride() : MsaSortOrderOverride(nullptr) {}
  ~MsaSortOrderOverride() PROTOBUF_FINAL;

#if defined(PROTOBUF_CUSTOM_VTABLE)
  void operator delete(MsaSortOrderOverride* PROTOBUF_NONNULL msg, std::destroying_delete_t) {
    SharedDtor(*msg);
    ::google::protobuf::internal::SizedDelete(msg, sizeof(MsaSortOrderOverride));
  }
#endif

  template <typename = void>
  explicit PROTOBUF_CONSTEXPR MsaSortOrderOverride(::google::protobuf::internal::ConstantInitialized);

  inline MsaSortOrderOverride(const MsaSortOrderOverride& from) : MsaSortOrderOverride(nullptr, from) {}
  inline MsaSortOrderOverride(MsaSortOrderOverride&& from) noexcept
      : MsaSortOrderOverride(nullptr, ::std::move(from)) {}
  inline MsaSortOrderOverride& operator=(const MsaSortOrderOverride& from) {
    CopyFrom(from);
    return *this;
  }
  inline MsaSortOrderOverride& operator=(MsaSortOrderOverride&& from) noexcept {
    if (this == &from) return *this;
    if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) {
      InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance);
  }
  inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields()
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>();
  }

  static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() {
    return GetDescriptor();
  }
  static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() {
    return default_instance().GetMetadata().descriptor;
  }
  static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() {
    return default_instance().GetMetadata().reflection;
  }
  static const MsaSortOrderOverride& default_instance() {
    return *reinterpret_cast<const MsaSortOrderOverride*>(
        &_MsaSortOrderOverride_default_instance_);
  }
  static constexpr int kIndexInFileMessages = 10;
  friend void swap(MsaSortOrderOverride& a, MsaSortOrderOverride& b) { a.Swap(&b); }
  inline void Swap(MsaSortOrderOverride* PROTOBUF_NONNULL other) {
    if (other == this) return;
    if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) {
      InternalSwap(other);
    } else {
      ::google::protobuf::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(MsaSortOrderOverride* PROTOBUF_NONNULL other) {
    if (other == this) return;
    ABSL_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  MsaSortOrderOverride* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const {
    return ::google::protobuf::Message::DefaultConstruct<MsaSortOrderOverride>(arena);
  }
  using ::google::protobuf::Message::CopyFrom;
  void CopyFrom(const MsaSortOrderOverride& from);
  using ::google::protobuf::Message::MergeFrom;
  void MergeFrom(const MsaSortOrderOverride& from) { MsaSortOrderOverride::MergeImpl(*this, from); }

  private:
  static void MergeImpl(::google::protobuf::MessageLite& to_msg,
                        const ::google::protobuf::MessageLite& from_msg);

  public:
  bool IsInitialized() const {
    return true;
  }
  ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL;
  #if defined(PROTOBUF_CUSTOM_VTABLE)
  private:
  static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg);
  static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream);

  public:
  ::size_t ByteSizeLong() const { return ByteSizeLong(*this); }
  ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
    return _InternalSerialize(*this, target, stream);
  }
  #else   // PROTOBUF_CUSTOM_VTABLE
  ::size_t ByteSizeLong() const final;
  ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final;
  #endif  // PROTOBUF_CUSTOM_VTABLE
  int GetCachedSize() const { return _impl_._cached_size_.Get(); }

  private:
  void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  static void SharedDtor(MessageLite& self);
  void InternalSwap(MsaSortOrderOverride* PROTOBUF_NONNULL other);
 private:
  template <typename T>
  friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)();
  static ::absl::string_view FullMessageName() { return "xla.memory_space_assignment.MsaSortOrderOverride"; }

 protected:
  explicit MsaSortOrderOverride(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  MsaSortOrderOverride(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const MsaSortOrderOverride& from);
  MsaSortOrderOverride(
      ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, MsaSortOrderOverride&& from) noexcept
      : MsaSortOrderOverride(arena) {
    *this = ::std::move(from);
  }
  const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL;
  static void* PROTOBUF_NONNULL PlacementNew_(
      const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
      ::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  static constexpr auto InternalNewImpl_();

 public:
  static constexpr auto InternalGenerateClassData_();

  ::google::protobuf::Metadata GetMetadata() const;
  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------
  enum : int {
    kHloPositionMatcherFieldNumber = 1,
    kOverrideOptionsFieldNumber = 2,
    kApplyToCrossProgramPrefetchesFieldNumber = 3,
  };
  // optional .xla.memory_space_assignment.HloPositionMatcher hlo_position_matcher = 1;
  bool has_hlo_position_matcher() const;
  void clear_hlo_position_matcher() ;
  const ::xla::memory_space_assignment::HloPositionMatcher& hlo_position_matcher() const;
  [[nodiscard]] ::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NULLABLE release_hlo_position_matcher();
  ::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NONNULL mutable_hlo_position_matcher();
  void set_allocated_hlo_position_matcher(::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NULLABLE value);
  void unsafe_arena_set_allocated_hlo_position_matcher(::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NULLABLE value);
  ::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NULLABLE unsafe_arena_release_hlo_position_matcher();

  private:
  const ::xla::memory_space_assignment::HloPositionMatcher& _internal_hlo_position_matcher() const;
  ::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NONNULL _internal_mutable_hlo_position_matcher();

  public:
  // optional .xla.memory_space_assignment.MsaSortOrderOverrideOptions override_options = 2;
  bool has_override_options() const;
  void clear_override_options() ;
  const ::xla::memory_space_assignment::MsaSortOrderOverrideOptions& override_options() const;
  [[nodiscard]] ::xla::memory_space_assignment::MsaSortOrderOverrideOptions* PROTOBUF_NULLABLE release_override_options();
  ::xla::memory_space_assignment::MsaSortOrderOverrideOptions* PROTOBUF_NONNULL mutable_override_options();
  void set_allocated_override_options(::xla::memory_space_assignment::MsaSortOrderOverrideOptions* PROTOBUF_NULLABLE value);
  void unsafe_arena_set_allocated_override_options(::xla::memory_space_assignment::MsaSortOrderOverrideOptions* PROTOBUF_NULLABLE value);
  ::xla::memory_space_assignment::MsaSortOrderOverrideOptions* PROTOBUF_NULLABLE unsafe_arena_release_override_options();

  private:
  const ::xla::memory_space_assignment::MsaSortOrderOverrideOptions& _internal_override_options() const;
  ::xla::memory_space_assignment::MsaSortOrderOverrideOptions* PROTOBUF_NONNULL _internal_mutable_override_options();

  public:
  // optional bool apply_to_cross_program_prefetches = 3;
  bool has_apply_to_cross_program_prefetches() const;
  void clear_apply_to_cross_program_prefetches() ;
  bool apply_to_cross_program_prefetches() const;
  void set_apply_to_cross_program_prefetches(bool value);

  private:
  bool _internal_apply_to_cross_program_prefetches() const;
  void _internal_set_apply_to_cross_program_prefetches(bool value);

  public:
  // @@protoc_insertion_point(class_scope:xla.memory_space_assignment.MsaSortOrderOverride)
 private:
  class _Internal;
  friend class ::google::protobuf::internal::TcParser;
  static const ::google::protobuf::internal::TcParseTable<2, 3,
                                   2, 0,
                                   2>
      _table_;

  friend class ::google::protobuf::MessageLite;
  friend class ::google::protobuf::Arena;
  template <typename T>
  friend class ::google::protobuf::Arena::InternalHelper;
  using InternalArenaConstructable_ = void;
  using DestructorSkippable_ = void;
  struct Impl_ {
    inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept;
    inline explicit Impl_(
        ::google::protobuf::internal::InternalVisibility visibility,
        ::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
    inline explicit Impl_(
        ::google::protobuf::internal::InternalVisibility visibility,
        ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
        const MsaSortOrderOverride& from_msg);
    ::google::protobuf::internal::HasBits<1> _has_bits_;
    ::google::protobuf::internal::CachedSize _cached_size_;
    ::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NULLABLE hlo_position_matcher_;
    ::xla::memory_space_assignment::MsaSortOrderOverrideOptions* PROTOBUF_NULLABLE override_options_;
    bool apply_to_cross_program_prefetches_;
    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_xla_2fservice_2fmemory_5fspace_5fassignment_2fmemory_5fspace_5fassignment_2eproto;
};

PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull MsaSortOrderOverride_class_data_;
// -------------------------------------------------------------------

class PROTOBUF_EXPORT PreferredPrefetchOverride final : public ::google::protobuf::Message
/* @@protoc_insertion_point(class_definition:xla.memory_space_assignment.PreferredPrefetchOverride) */ {
 public:
  inline PreferredPrefetchOverride() : PreferredPrefetchOverride(nullptr) {}
  ~PreferredPrefetchOverride() PROTOBUF_FINAL;

#if defined(PROTOBUF_CUSTOM_VTABLE)
  void operator delete(PreferredPrefetchOverride* PROTOBUF_NONNULL msg, std::destroying_delete_t) {
    SharedDtor(*msg);
    ::google::protobuf::internal::SizedDelete(msg, sizeof(PreferredPrefetchOverride));
  }
#endif

  template <typename = void>
  explicit PROTOBUF_CONSTEXPR PreferredPrefetchOverride(::google::protobuf::internal::ConstantInitialized);

  inline PreferredPrefetchOverride(const PreferredPrefetchOverride& from) : PreferredPrefetchOverride(nullptr, from) {}
  inline PreferredPrefetchOverride(PreferredPrefetchOverride&& from) noexcept
      : PreferredPrefetchOverride(nullptr, ::std::move(from)) {}
  inline PreferredPrefetchOverride& operator=(const PreferredPrefetchOverride& from) {
    CopyFrom(from);
    return *this;
  }
  inline PreferredPrefetchOverride& operator=(PreferredPrefetchOverride&& from) noexcept {
    if (this == &from) return *this;
    if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) {
      InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance);
  }
  inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields()
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>();
  }

  static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() {
    return GetDescriptor();
  }
  static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() {
    return default_instance().GetMetadata().descriptor;
  }
  static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() {
    return default_instance().GetMetadata().reflection;
  }
  static const PreferredPrefetchOverride& default_instance() {
    return *reinterpret_cast<const PreferredPrefetchOverride*>(
        &_PreferredPrefetchOverride_default_instance_);
  }
  static constexpr int kIndexInFileMessages = 5;
  friend void swap(PreferredPrefetchOverride& a, PreferredPrefetchOverride& b) { a.Swap(&b); }
  inline void Swap(PreferredPrefetchOverride* PROTOBUF_NONNULL other) {
    if (other == this) return;
    if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) {
      InternalSwap(other);
    } else {
      ::google::protobuf::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(PreferredPrefetchOverride* PROTOBUF_NONNULL other) {
    if (other == this) return;
    ABSL_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  PreferredPrefetchOverride* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const {
    return ::google::protobuf::Message::DefaultConstruct<PreferredPrefetchOverride>(arena);
  }
  using ::google::protobuf::Message::CopyFrom;
  void CopyFrom(const PreferredPrefetchOverride& from);
  using ::google::protobuf::Message::MergeFrom;
  void MergeFrom(const PreferredPrefetchOverride& from) { PreferredPrefetchOverride::MergeImpl(*this, from); }

  private:
  static void MergeImpl(::google::protobuf::MessageLite& to_msg,
                        const ::google::protobuf::MessageLite& from_msg);

  public:
  bool IsInitialized() const {
    return true;
  }
  ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL;
  #if defined(PROTOBUF_CUSTOM_VTABLE)
  private:
  static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg);
  static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream);

  public:
  ::size_t ByteSizeLong() const { return ByteSizeLong(*this); }
  ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
    return _InternalSerialize(*this, target, stream);
  }
  #else   // PROTOBUF_CUSTOM_VTABLE
  ::size_t ByteSizeLong() const final;
  ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final;
  #endif  // PROTOBUF_CUSTOM_VTABLE
  int GetCachedSize() const { return _impl_._cached_size_.Get(); }

  private:
  void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  static void SharedDtor(MessageLite& self);
  void InternalSwap(PreferredPrefetchOverride* PROTOBUF_NONNULL other);
 private:
  template <typename T>
  friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)();
  static ::absl::string_view FullMessageName() { return "xla.memory_space_assignment.PreferredPrefetchOverride"; }

 protected:
  explicit PreferredPrefetchOverride(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  PreferredPrefetchOverride(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const PreferredPrefetchOverride& from);
  PreferredPrefetchOverride(
      ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, PreferredPrefetchOverride&& from) noexcept
      : PreferredPrefetchOverride(arena) {
    *this = ::std::move(from);
  }
  const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL;
  static void* PROTOBUF_NONNULL PlacementNew_(
      const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
      ::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  static constexpr auto InternalNewImpl_();

 public:
  static constexpr auto InternalGenerateClassData_();

  ::google::protobuf::Metadata GetMetadata() const;
  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------
  enum : int {
    kHloOperandFilterFieldNumber = 1,
    kOverrideOptionsFieldNumber = 2,
  };
  // optional .xla.memory_space_assignment.HloOperandFilter hlo_operand_filter = 1;
  bool has_hlo_operand_filter() const;
  void clear_hlo_operand_filter() ;
  const ::xla::memory_space_assignment::HloOperandFilter& hlo_operand_filter() const;
  [[nodiscard]] ::xla::memory_space_assignment::HloOperandFilter* PROTOBUF_NULLABLE release_hlo_operand_filter();
  ::xla::memory_space_assignment::HloOperandFilter* PROTOBUF_NONNULL mutable_hlo_operand_filter();
  void set_allocated_hlo_operand_filter(::xla::memory_space_assignment::HloOperandFilter* PROTOBUF_NULLABLE value);
  void unsafe_arena_set_allocated_hlo_operand_filter(::xla::memory_space_assignment::HloOperandFilter* PROTOBUF_NULLABLE value);
  ::xla::memory_space_assignment::HloOperandFilter* PROTOBUF_NULLABLE unsafe_arena_release_hlo_operand_filter();

  private:
  const ::xla::memory_space_assignment::HloOperandFilter& _internal_hlo_operand_filter() const;
  ::xla::memory_space_assignment::HloOperandFilter* PROTOBUF_NONNULL _internal_mutable_hlo_operand_filter();

  public:
  // optional .xla.memory_space_assignment.PreferredPrefetchOverrideOptions override_options = 2;
  bool has_override_options() const;
  void clear_override_options() ;
  const ::xla::memory_space_assignment::PreferredPrefetchOverrideOptions& override_options() const;
  [[nodiscard]] ::xla::memory_space_assignment::PreferredPrefetchOverrideOptions* PROTOBUF_NULLABLE release_override_options();
  ::xla::memory_space_assignment::PreferredPrefetchOverrideOptions* PROTOBUF_NONNULL mutable_override_options();
  void set_allocated_override_options(::xla::memory_space_assignment::PreferredPrefetchOverrideOptions* PROTOBUF_NULLABLE value);
  void unsafe_arena_set_allocated_override_options(::xla::memory_space_assignment::PreferredPrefetchOverrideOptions* PROTOBUF_NULLABLE value);
  ::xla::memory_space_assignment::PreferredPrefetchOverrideOptions* PROTOBUF_NULLABLE unsafe_arena_release_override_options();

  private:
  const ::xla::memory_space_assignment::PreferredPrefetchOverrideOptions& _internal_override_options() const;
  ::xla::memory_space_assignment::PreferredPrefetchOverrideOptions* PROTOBUF_NONNULL _internal_mutable_override_options();

  public:
  // @@protoc_insertion_point(class_scope:xla.memory_space_assignment.PreferredPrefetchOverride)
 private:
  class _Internal;
  friend class ::google::protobuf::internal::TcParser;
  static const ::google::protobuf::internal::TcParseTable<1, 2,
                                   2, 0,
                                   2>
      _table_;

  friend class ::google::protobuf::MessageLite;
  friend class ::google::protobuf::Arena;
  template <typename T>
  friend class ::google::protobuf::Arena::InternalHelper;
  using InternalArenaConstructable_ = void;
  using DestructorSkippable_ = void;
  struct Impl_ {
    inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept;
    inline explicit Impl_(
        ::google::protobuf::internal::InternalVisibility visibility,
        ::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
    inline explicit Impl_(
        ::google::protobuf::internal::InternalVisibility visibility,
        ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
        const PreferredPrefetchOverride& from_msg);
    ::google::protobuf::internal::HasBits<1> _has_bits_;
    ::google::protobuf::internal::CachedSize _cached_size_;
    ::xla::memory_space_assignment::HloOperandFilter* PROTOBUF_NULLABLE hlo_operand_filter_;
    ::xla::memory_space_assignment::PreferredPrefetchOverrideOptions* PROTOBUF_NULLABLE override_options_;
    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_xla_2fservice_2fmemory_5fspace_5fassignment_2fmemory_5fspace_5fassignment_2eproto;
};

PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull PreferredPrefetchOverride_class_data_;
// -------------------------------------------------------------------

class PROTOBUF_EXPORT MsaSortOrderOverrides final : public ::google::protobuf::Message
/* @@protoc_insertion_point(class_definition:xla.memory_space_assignment.MsaSortOrderOverrides) */ {
 public:
  inline MsaSortOrderOverrides() : MsaSortOrderOverrides(nullptr) {}
  ~MsaSortOrderOverrides() PROTOBUF_FINAL;

#if defined(PROTOBUF_CUSTOM_VTABLE)
  void operator delete(MsaSortOrderOverrides* PROTOBUF_NONNULL msg, std::destroying_delete_t) {
    SharedDtor(*msg);
    ::google::protobuf::internal::SizedDelete(msg, sizeof(MsaSortOrderOverrides));
  }
#endif

  template <typename = void>
  explicit PROTOBUF_CONSTEXPR MsaSortOrderOverrides(::google::protobuf::internal::ConstantInitialized);

  inline MsaSortOrderOverrides(const MsaSortOrderOverrides& from) : MsaSortOrderOverrides(nullptr, from) {}
  inline MsaSortOrderOverrides(MsaSortOrderOverrides&& from) noexcept
      : MsaSortOrderOverrides(nullptr, ::std::move(from)) {}
  inline MsaSortOrderOverrides& operator=(const MsaSortOrderOverrides& from) {
    CopyFrom(from);
    return *this;
  }
  inline MsaSortOrderOverrides& operator=(MsaSortOrderOverrides&& from) noexcept {
    if (this == &from) return *this;
    if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) {
      InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance);
  }
  inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields()
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>();
  }

  static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() {
    return GetDescriptor();
  }
  static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() {
    return default_instance().GetMetadata().descriptor;
  }
  static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() {
    return default_instance().GetMetadata().reflection;
  }
  static const MsaSortOrderOverrides& default_instance() {
    return *reinterpret_cast<const MsaSortOrderOverrides*>(
        &_MsaSortOrderOverrides_default_instance_);
  }
  static constexpr int kIndexInFileMessages = 11;
  friend void swap(MsaSortOrderOverrides& a, MsaSortOrderOverrides& b) { a.Swap(&b); }
  inline void Swap(MsaSortOrderOverrides* PROTOBUF_NONNULL other) {
    if (other == this) return;
    if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) {
      InternalSwap(other);
    } else {
      ::google::protobuf::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(MsaSortOrderOverrides* PROTOBUF_NONNULL other) {
    if (other == this) return;
    ABSL_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  MsaSortOrderOverrides* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const {
    return ::google::protobuf::Message::DefaultConstruct<MsaSortOrderOverrides>(arena);
  }
  using ::google::protobuf::Message::CopyFrom;
  void CopyFrom(const MsaSortOrderOverrides& from);
  using ::google::protobuf::Message::MergeFrom;
  void MergeFrom(const MsaSortOrderOverrides& from) { MsaSortOrderOverrides::MergeImpl(*this, from); }

  private:
  static void MergeImpl(::google::protobuf::MessageLite& to_msg,
                        const ::google::protobuf::MessageLite& from_msg);

  public:
  bool IsInitialized() const {
    return true;
  }
  ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL;
  #if defined(PROTOBUF_CUSTOM_VTABLE)
  private:
  static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg);
  static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream);

  public:
  ::size_t ByteSizeLong() const { return ByteSizeLong(*this); }
  ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
    return _InternalSerialize(*this, target, stream);
  }
  #else   // PROTOBUF_CUSTOM_VTABLE
  ::size_t ByteSizeLong() const final;
  ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final;
  #endif  // PROTOBUF_CUSTOM_VTABLE
  int GetCachedSize() const { return _impl_._cached_size_.Get(); }

  private:
  void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  static void SharedDtor(MessageLite& self);
  void InternalSwap(MsaSortOrderOverrides* PROTOBUF_NONNULL other);
 private:
  template <typename T>
  friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)();
  static ::absl::string_view FullMessageName() { return "xla.memory_space_assignment.MsaSortOrderOverrides"; }

 protected:
  explicit MsaSortOrderOverrides(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  MsaSortOrderOverrides(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const MsaSortOrderOverrides& from);
  MsaSortOrderOverrides(
      ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, MsaSortOrderOverrides&& from) noexcept
      : MsaSortOrderOverrides(arena) {
    *this = ::std::move(from);
  }
  const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL;
  static void* PROTOBUF_NONNULL PlacementNew_(
      const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
      ::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  static constexpr auto InternalNewImpl_();

 public:
  static constexpr auto InternalGenerateClassData_();

  ::google::protobuf::Metadata GetMetadata() const;
  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------
  enum : int {
    kOverridesFieldNumber = 1,
  };
  // repeated .xla.memory_space_assignment.MsaSortOrderOverride overrides = 1;
  int overrides_size() const;
  private:
  int _internal_overrides_size() const;

  public:
  void clear_overrides() ;
  ::xla::memory_space_assignment::MsaSortOrderOverride* PROTOBUF_NONNULL mutable_overrides(int index);
  ::google::protobuf::RepeatedPtrField<::xla::memory_space_assignment::MsaSortOrderOverride>* PROTOBUF_NONNULL mutable_overrides();

  private:
  const ::google::protobuf::RepeatedPtrField<::xla::memory_space_assignment::MsaSortOrderOverride>& _internal_overrides() const;
  ::google::protobuf::RepeatedPtrField<::xla::memory_space_assignment::MsaSortOrderOverride>* PROTOBUF_NONNULL _internal_mutable_overrides();
  public:
  const ::xla::memory_space_assignment::MsaSortOrderOverride& overrides(int index) const;
  ::xla::memory_space_assignment::MsaSortOrderOverride* PROTOBUF_NONNULL add_overrides();
  const ::google::protobuf::RepeatedPtrField<::xla::memory_space_assignment::MsaSortOrderOverride>& overrides() const;
  // @@protoc_insertion_point(class_scope:xla.memory_space_assignment.MsaSortOrderOverrides)
 private:
  class _Internal;
  friend class ::google::protobuf::internal::TcParser;
  static const ::google::protobuf::internal::TcParseTable<0, 1,
                                   1, 0,
                                   2>
      _table_;

  friend class ::google::protobuf::MessageLite;
  friend class ::google::protobuf::Arena;
  template <typename T>
  friend class ::google::protobuf::Arena::InternalHelper;
  using InternalArenaConstructable_ = void;
  using DestructorSkippable_ = void;
  struct Impl_ {
    inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept;
    inline explicit Impl_(
        ::google::protobuf::internal::InternalVisibility visibility,
        ::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
    inline explicit Impl_(
        ::google::protobuf::internal::InternalVisibility visibility,
        ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
        const MsaSortOrderOverrides& from_msg);
    ::google::protobuf::RepeatedPtrField< ::xla::memory_space_assignment::MsaSortOrderOverride > overrides_;
    ::google::protobuf::internal::CachedSize _cached_size_;
    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_xla_2fservice_2fmemory_5fspace_5fassignment_2fmemory_5fspace_5fassignment_2eproto;
};

PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull MsaSortOrderOverrides_class_data_;
// -------------------------------------------------------------------

class PROTOBUF_EXPORT PreferredPrefetchOverrides final : public ::google::protobuf::Message
/* @@protoc_insertion_point(class_definition:xla.memory_space_assignment.PreferredPrefetchOverrides) */ {
 public:
  inline PreferredPrefetchOverrides() : PreferredPrefetchOverrides(nullptr) {}
  ~PreferredPrefetchOverrides() PROTOBUF_FINAL;

#if defined(PROTOBUF_CUSTOM_VTABLE)
  void operator delete(PreferredPrefetchOverrides* PROTOBUF_NONNULL msg, std::destroying_delete_t) {
    SharedDtor(*msg);
    ::google::protobuf::internal::SizedDelete(msg, sizeof(PreferredPrefetchOverrides));
  }
#endif

  template <typename = void>
  explicit PROTOBUF_CONSTEXPR PreferredPrefetchOverrides(::google::protobuf::internal::ConstantInitialized);

  inline PreferredPrefetchOverrides(const PreferredPrefetchOverrides& from) : PreferredPrefetchOverrides(nullptr, from) {}
  inline PreferredPrefetchOverrides(PreferredPrefetchOverrides&& from) noexcept
      : PreferredPrefetchOverrides(nullptr, ::std::move(from)) {}
  inline PreferredPrefetchOverrides& operator=(const PreferredPrefetchOverrides& from) {
    CopyFrom(from);
    return *this;
  }
  inline PreferredPrefetchOverrides& operator=(PreferredPrefetchOverrides&& from) noexcept {
    if (this == &from) return *this;
    if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) {
      InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance);
  }
  inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields()
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>();
  }

  static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() {
    return GetDescriptor();
  }
  static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() {
    return default_instance().GetMetadata().descriptor;
  }
  static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() {
    return default_instance().GetMetadata().reflection;
  }
  static const PreferredPrefetchOverrides& default_instance() {
    return *reinterpret_cast<const PreferredPrefetchOverrides*>(
        &_PreferredPrefetchOverrides_default_instance_);
  }
  static constexpr int kIndexInFileMessages = 6;
  friend void swap(PreferredPrefetchOverrides& a, PreferredPrefetchOverrides& b) { a.Swap(&b); }
  inline void Swap(PreferredPrefetchOverrides* PROTOBUF_NONNULL other) {
    if (other == this) return;
    if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) {
      InternalSwap(other);
    } else {
      ::google::protobuf::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(PreferredPrefetchOverrides* PROTOBUF_NONNULL other) {
    if (other == this) return;
    ABSL_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  PreferredPrefetchOverrides* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const {
    return ::google::protobuf::Message::DefaultConstruct<PreferredPrefetchOverrides>(arena);
  }
  using ::google::protobuf::Message::CopyFrom;
  void CopyFrom(const PreferredPrefetchOverrides& from);
  using ::google::protobuf::Message::MergeFrom;
  void MergeFrom(const PreferredPrefetchOverrides& from) { PreferredPrefetchOverrides::MergeImpl(*this, from); }

  private:
  static void MergeImpl(::google::protobuf::MessageLite& to_msg,
                        const ::google::protobuf::MessageLite& from_msg);

  public:
  bool IsInitialized() const {
    return true;
  }
  ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL;
  #if defined(PROTOBUF_CUSTOM_VTABLE)
  private:
  static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg);
  static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream);

  public:
  ::size_t ByteSizeLong() const { return ByteSizeLong(*this); }
  ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
    return _InternalSerialize(*this, target, stream);
  }
  #else   // PROTOBUF_CUSTOM_VTABLE
  ::size_t ByteSizeLong() const final;
  ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final;
  #endif  // PROTOBUF_CUSTOM_VTABLE
  int GetCachedSize() const { return _impl_._cached_size_.Get(); }

  private:
  void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  static void SharedDtor(MessageLite& self);
  void InternalSwap(PreferredPrefetchOverrides* PROTOBUF_NONNULL other);
 private:
  template <typename T>
  friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)();
  static ::absl::string_view FullMessageName() { return "xla.memory_space_assignment.PreferredPrefetchOverrides"; }

 protected:
  explicit PreferredPrefetchOverrides(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  PreferredPrefetchOverrides(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const PreferredPrefetchOverrides& from);
  PreferredPrefetchOverrides(
      ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, PreferredPrefetchOverrides&& from) noexcept
      : PreferredPrefetchOverrides(arena) {
    *this = ::std::move(from);
  }
  const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL;
  static void* PROTOBUF_NONNULL PlacementNew_(
      const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
      ::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  static constexpr auto InternalNewImpl_();

 public:
  static constexpr auto InternalGenerateClassData_();

  ::google::protobuf::Metadata GetMetadata() const;
  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------
  enum : int {
    kOverridesFieldNumber = 1,
  };
  // repeated .xla.memory_space_assignment.PreferredPrefetchOverride overrides = 1;
  int overrides_size() const;
  private:
  int _internal_overrides_size() const;

  public:
  void clear_overrides() ;
  ::xla::memory_space_assignment::PreferredPrefetchOverride* PROTOBUF_NONNULL mutable_overrides(int index);
  ::google::protobuf::RepeatedPtrField<::xla::memory_space_assignment::PreferredPrefetchOverride>* PROTOBUF_NONNULL mutable_overrides();

  private:
  const ::google::protobuf::RepeatedPtrField<::xla::memory_space_assignment::PreferredPrefetchOverride>& _internal_overrides() const;
  ::google::protobuf::RepeatedPtrField<::xla::memory_space_assignment::PreferredPrefetchOverride>* PROTOBUF_NONNULL _internal_mutable_overrides();
  public:
  const ::xla::memory_space_assignment::PreferredPrefetchOverride& overrides(int index) const;
  ::xla::memory_space_assignment::PreferredPrefetchOverride* PROTOBUF_NONNULL add_overrides();
  const ::google::protobuf::RepeatedPtrField<::xla::memory_space_assignment::PreferredPrefetchOverride>& overrides() const;
  // @@protoc_insertion_point(class_scope:xla.memory_space_assignment.PreferredPrefetchOverrides)
 private:
  class _Internal;
  friend class ::google::protobuf::internal::TcParser;
  static const ::google::protobuf::internal::TcParseTable<0, 1,
                                   1, 0,
                                   2>
      _table_;

  friend class ::google::protobuf::MessageLite;
  friend class ::google::protobuf::Arena;
  template <typename T>
  friend class ::google::protobuf::Arena::InternalHelper;
  using InternalArenaConstructable_ = void;
  using DestructorSkippable_ = void;
  struct Impl_ {
    inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept;
    inline explicit Impl_(
        ::google::protobuf::internal::InternalVisibility visibility,
        ::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
    inline explicit Impl_(
        ::google::protobuf::internal::InternalVisibility visibility,
        ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
        const PreferredPrefetchOverrides& from_msg);
    ::google::protobuf::RepeatedPtrField< ::xla::memory_space_assignment::PreferredPrefetchOverride > overrides_;
    ::google::protobuf::internal::CachedSize _cached_size_;
    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_xla_2fservice_2fmemory_5fspace_5fassignment_2fmemory_5fspace_5fassignment_2eproto;
};

PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull PreferredPrefetchOverrides_class_data_;

// ===================================================================




// ===================================================================


#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif  // __GNUC__
// -------------------------------------------------------------------

// SlicedPrefetchOptions

// uint32 max_slices = 1;
inline void SlicedPrefetchOptions::clear_max_slices() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.max_slices_ = 0u;
  _impl_._has_bits_[0] &= ~0x00000002u;
}
inline ::uint32_t SlicedPrefetchOptions::max_slices() const {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.SlicedPrefetchOptions.max_slices)
  return _internal_max_slices();
}
inline void SlicedPrefetchOptions::set_max_slices(::uint32_t value) {
  _internal_set_max_slices(value);
  _impl_._has_bits_[0] |= 0x00000002u;
  // @@protoc_insertion_point(field_set:xla.memory_space_assignment.SlicedPrefetchOptions.max_slices)
}
inline ::uint32_t SlicedPrefetchOptions::_internal_max_slices() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  return _impl_.max_slices_;
}
inline void SlicedPrefetchOptions::_internal_set_max_slices(::uint32_t value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.max_slices_ = value;
}

// uint64 min_bytes = 2;
inline void SlicedPrefetchOptions::clear_min_bytes() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.min_bytes_ = ::uint64_t{0u};
  _impl_._has_bits_[0] &= ~0x00000001u;
}
inline ::uint64_t SlicedPrefetchOptions::min_bytes() const {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.SlicedPrefetchOptions.min_bytes)
  return _internal_min_bytes();
}
inline void SlicedPrefetchOptions::set_min_bytes(::uint64_t value) {
  _internal_set_min_bytes(value);
  _impl_._has_bits_[0] |= 0x00000001u;
  // @@protoc_insertion_point(field_set:xla.memory_space_assignment.SlicedPrefetchOptions.min_bytes)
}
inline ::uint64_t SlicedPrefetchOptions::_internal_min_bytes() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  return _impl_.min_bytes_;
}
inline void SlicedPrefetchOptions::_internal_set_min_bytes(::uint64_t value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.min_bytes_ = value;
}

// bool fail_on_non_alignment_boundary_slice_proposal = 3;
inline void SlicedPrefetchOptions::clear_fail_on_non_alignment_boundary_slice_proposal() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.fail_on_non_alignment_boundary_slice_proposal_ = false;
  _impl_._has_bits_[0] &= ~0x00000004u;
}
inline bool SlicedPrefetchOptions::fail_on_non_alignment_boundary_slice_proposal() const {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.SlicedPrefetchOptions.fail_on_non_alignment_boundary_slice_proposal)
  return _internal_fail_on_non_alignment_boundary_slice_proposal();
}
inline void SlicedPrefetchOptions::set_fail_on_non_alignment_boundary_slice_proposal(bool value) {
  _internal_set_fail_on_non_alignment_boundary_slice_proposal(value);
  _impl_._has_bits_[0] |= 0x00000004u;
  // @@protoc_insertion_point(field_set:xla.memory_space_assignment.SlicedPrefetchOptions.fail_on_non_alignment_boundary_slice_proposal)
}
inline bool SlicedPrefetchOptions::_internal_fail_on_non_alignment_boundary_slice_proposal() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  return _impl_.fail_on_non_alignment_boundary_slice_proposal_;
}
inline void SlicedPrefetchOptions::_internal_set_fail_on_non_alignment_boundary_slice_proposal(bool value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.fail_on_non_alignment_boundary_slice_proposal_ = value;
}

// uint32 all_slice_time_permutations_threshold = 4;
inline void SlicedPrefetchOptions::clear_all_slice_time_permutations_threshold() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.all_slice_time_permutations_threshold_ = 0u;
  _impl_._has_bits_[0] &= ~0x00000010u;
}
inline ::uint32_t SlicedPrefetchOptions::all_slice_time_permutations_threshold() const {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.SlicedPrefetchOptions.all_slice_time_permutations_threshold)
  return _internal_all_slice_time_permutations_threshold();
}
inline void SlicedPrefetchOptions::set_all_slice_time_permutations_threshold(::uint32_t value) {
  _internal_set_all_slice_time_permutations_threshold(value);
  _impl_._has_bits_[0] |= 0x00000010u;
  // @@protoc_insertion_point(field_set:xla.memory_space_assignment.SlicedPrefetchOptions.all_slice_time_permutations_threshold)
}
inline ::uint32_t SlicedPrefetchOptions::_internal_all_slice_time_permutations_threshold() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  return _impl_.all_slice_time_permutations_threshold_;
}
inline void SlicedPrefetchOptions::_internal_set_all_slice_time_permutations_threshold(::uint32_t value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.all_slice_time_permutations_threshold_ = value;
}

// uint64 preferred_slice_size = 5;
inline void SlicedPrefetchOptions::clear_preferred_slice_size() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.preferred_slice_size_ = ::uint64_t{0u};
  _impl_._has_bits_[0] &= ~0x00000008u;
}
inline ::uint64_t SlicedPrefetchOptions::preferred_slice_size() const {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.SlicedPrefetchOptions.preferred_slice_size)
  return _internal_preferred_slice_size();
}
inline void SlicedPrefetchOptions::set_preferred_slice_size(::uint64_t value) {
  _internal_set_preferred_slice_size(value);
  _impl_._has_bits_[0] |= 0x00000008u;
  // @@protoc_insertion_point(field_set:xla.memory_space_assignment.SlicedPrefetchOptions.preferred_slice_size)
}
inline ::uint64_t SlicedPrefetchOptions::_internal_preferred_slice_size() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  return _impl_.preferred_slice_size_;
}
inline void SlicedPrefetchOptions::_internal_set_preferred_slice_size(::uint64_t value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.preferred_slice_size_ = value;
}

// -------------------------------------------------------------------

// MemoryBoundLoopOptimizerOptions

// optional bool enabled = 1;
inline bool MemoryBoundLoopOptimizerOptions::has_enabled() const {
  bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
  return value;
}
inline void MemoryBoundLoopOptimizerOptions::clear_enabled() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.enabled_ = false;
  _impl_._has_bits_[0] &= ~0x00000002u;
}
inline bool MemoryBoundLoopOptimizerOptions::enabled() const {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.MemoryBoundLoopOptimizerOptions.enabled)
  return _internal_enabled();
}
inline void MemoryBoundLoopOptimizerOptions::set_enabled(bool value) {
  _internal_set_enabled(value);
  _impl_._has_bits_[0] |= 0x00000002u;
  // @@protoc_insertion_point(field_set:xla.memory_space_assignment.MemoryBoundLoopOptimizerOptions.enabled)
}
inline bool MemoryBoundLoopOptimizerOptions::_internal_enabled() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  return _impl_.enabled_;
}
inline void MemoryBoundLoopOptimizerOptions::_internal_set_enabled(bool value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.enabled_ = value;
}

// optional float desired_copy_ratio = 2;
inline bool MemoryBoundLoopOptimizerOptions::has_desired_copy_ratio() const {
  bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
  return value;
}
inline void MemoryBoundLoopOptimizerOptions::clear_desired_copy_ratio() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.desired_copy_ratio_ = 0;
  _impl_._has_bits_[0] &= ~0x00000001u;
}
inline float MemoryBoundLoopOptimizerOptions::desired_copy_ratio() const {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.MemoryBoundLoopOptimizerOptions.desired_copy_ratio)
  return _internal_desired_copy_ratio();
}
inline void MemoryBoundLoopOptimizerOptions::set_desired_copy_ratio(float value) {
  _internal_set_desired_copy_ratio(value);
  _impl_._has_bits_[0] |= 0x00000001u;
  // @@protoc_insertion_point(field_set:xla.memory_space_assignment.MemoryBoundLoopOptimizerOptions.desired_copy_ratio)
}
inline float MemoryBoundLoopOptimizerOptions::_internal_desired_copy_ratio() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  return _impl_.desired_copy_ratio_;
}
inline void MemoryBoundLoopOptimizerOptions::_internal_set_desired_copy_ratio(float value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.desired_copy_ratio_ = value;
}

// optional bool allow_unsatisfied_fully_pipelined_prefetch = 3;
inline bool MemoryBoundLoopOptimizerOptions::has_allow_unsatisfied_fully_pipelined_prefetch() const {
  bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0;
  return value;
}
inline void MemoryBoundLoopOptimizerOptions::clear_allow_unsatisfied_fully_pipelined_prefetch() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.allow_unsatisfied_fully_pipelined_prefetch_ = false;
  _impl_._has_bits_[0] &= ~0x00000004u;
}
inline bool MemoryBoundLoopOptimizerOptions::allow_unsatisfied_fully_pipelined_prefetch() const {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.MemoryBoundLoopOptimizerOptions.allow_unsatisfied_fully_pipelined_prefetch)
  return _internal_allow_unsatisfied_fully_pipelined_prefetch();
}
inline void MemoryBoundLoopOptimizerOptions::set_allow_unsatisfied_fully_pipelined_prefetch(bool value) {
  _internal_set_allow_unsatisfied_fully_pipelined_prefetch(value);
  _impl_._has_bits_[0] |= 0x00000004u;
  // @@protoc_insertion_point(field_set:xla.memory_space_assignment.MemoryBoundLoopOptimizerOptions.allow_unsatisfied_fully_pipelined_prefetch)
}
inline bool MemoryBoundLoopOptimizerOptions::_internal_allow_unsatisfied_fully_pipelined_prefetch() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  return _impl_.allow_unsatisfied_fully_pipelined_prefetch_;
}
inline void MemoryBoundLoopOptimizerOptions::_internal_set_allow_unsatisfied_fully_pipelined_prefetch(bool value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.allow_unsatisfied_fully_pipelined_prefetch_ = value;
}

// optional float min_num_iterations = 4;
inline bool MemoryBoundLoopOptimizerOptions::has_min_num_iterations() const {
  bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0;
  return value;
}
inline void MemoryBoundLoopOptimizerOptions::clear_min_num_iterations() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.min_num_iterations_ = 0;
  _impl_._has_bits_[0] &= ~0x00000008u;
}
inline float MemoryBoundLoopOptimizerOptions::min_num_iterations() const {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.MemoryBoundLoopOptimizerOptions.min_num_iterations)
  return _internal_min_num_iterations();
}
inline void MemoryBoundLoopOptimizerOptions::set_min_num_iterations(float value) {
  _internal_set_min_num_iterations(value);
  _impl_._has_bits_[0] |= 0x00000008u;
  // @@protoc_insertion_point(field_set:xla.memory_space_assignment.MemoryBoundLoopOptimizerOptions.min_num_iterations)
}
inline float MemoryBoundLoopOptimizerOptions::_internal_min_num_iterations() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  return _impl_.min_num_iterations_;
}
inline void MemoryBoundLoopOptimizerOptions::_internal_set_min_num_iterations(float value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.min_num_iterations_ = value;
}

// -------------------------------------------------------------------

// TupleShapeIndex

// repeated int64 index = 1;
inline int TupleShapeIndex::_internal_index_size() const {
  return _internal_index().size();
}
inline int TupleShapeIndex::index_size() const {
  return _internal_index_size();
}
inline void TupleShapeIndex::clear_index() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.index_.Clear();
}
inline ::int64_t TupleShapeIndex::index(int index) const {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.TupleShapeIndex.index)
  return _internal_index().Get(index);
}
inline void TupleShapeIndex::set_index(int index, ::int64_t value) {
  _internal_mutable_index()->Set(index, value);
  // @@protoc_insertion_point(field_set:xla.memory_space_assignment.TupleShapeIndex.index)
}
inline void TupleShapeIndex::add_index(::int64_t value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _internal_mutable_index()->Add(value);
  // @@protoc_insertion_point(field_add:xla.memory_space_assignment.TupleShapeIndex.index)
}
inline const ::google::protobuf::RepeatedField<::int64_t>& TupleShapeIndex::index() const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_list:xla.memory_space_assignment.TupleShapeIndex.index)
  return _internal_index();
}
inline ::google::protobuf::RepeatedField<::int64_t>* PROTOBUF_NONNULL TupleShapeIndex::mutable_index()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_mutable_list:xla.memory_space_assignment.TupleShapeIndex.index)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  return _internal_mutable_index();
}
inline const ::google::protobuf::RepeatedField<::int64_t>&
TupleShapeIndex::_internal_index() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  return _impl_.index_;
}
inline ::google::protobuf::RepeatedField<::int64_t>* PROTOBUF_NONNULL
TupleShapeIndex::_internal_mutable_index() {
  ::google::protobuf::internal::TSanRead(&_impl_);
  return &_impl_.index_;
}

// -------------------------------------------------------------------

// HloOperandFilter

// optional string instruction_name_regex = 1;
inline bool HloOperandFilter::has_instruction_name_regex() const {
  bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
  return value;
}
inline void HloOperandFilter::clear_instruction_name_regex() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.instruction_name_regex_.ClearToEmpty();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
inline const ::std::string& HloOperandFilter::instruction_name_regex() const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.HloOperandFilter.instruction_name_regex)
  return _internal_instruction_name_regex();
}
template <typename Arg_, typename... Args_>
PROTOBUF_ALWAYS_INLINE void HloOperandFilter::set_instruction_name_regex(Arg_&& arg, Args_... args) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_._has_bits_[0] |= 0x00000001u;
  _impl_.instruction_name_regex_.Set(static_cast<Arg_&&>(arg), args..., GetArena());
  // @@protoc_insertion_point(field_set:xla.memory_space_assignment.HloOperandFilter.instruction_name_regex)
}
inline ::std::string* PROTOBUF_NONNULL HloOperandFilter::mutable_instruction_name_regex()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::std::string* _s = _internal_mutable_instruction_name_regex();
  // @@protoc_insertion_point(field_mutable:xla.memory_space_assignment.HloOperandFilter.instruction_name_regex)
  return _s;
}
inline const ::std::string& HloOperandFilter::_internal_instruction_name_regex() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  return _impl_.instruction_name_regex_.Get();
}
inline void HloOperandFilter::_internal_set_instruction_name_regex(const ::std::string& value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_._has_bits_[0] |= 0x00000001u;
  _impl_.instruction_name_regex_.Set(value, GetArena());
}
inline ::std::string* PROTOBUF_NONNULL HloOperandFilter::_internal_mutable_instruction_name_regex() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_._has_bits_[0] |= 0x00000001u;
  return _impl_.instruction_name_regex_.Mutable( GetArena());
}
inline ::std::string* PROTOBUF_NULLABLE HloOperandFilter::release_instruction_name_regex() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  // @@protoc_insertion_point(field_release:xla.memory_space_assignment.HloOperandFilter.instruction_name_regex)
  if ((_impl_._has_bits_[0] & 0x00000001u) == 0) {
    return nullptr;
  }
  _impl_._has_bits_[0] &= ~0x00000001u;
  auto* released = _impl_.instruction_name_regex_.Release();
  if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) {
    _impl_.instruction_name_regex_.Set("", GetArena());
  }
  return released;
}
inline void HloOperandFilter::set_allocated_instruction_name_regex(::std::string* PROTOBUF_NULLABLE value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (value != nullptr) {
    _impl_._has_bits_[0] |= 0x00000001u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000001u;
  }
  _impl_.instruction_name_regex_.SetAllocated(value, GetArena());
  if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.instruction_name_regex_.IsDefault()) {
    _impl_.instruction_name_regex_.Set("", GetArena());
  }
  // @@protoc_insertion_point(field_set_allocated:xla.memory_space_assignment.HloOperandFilter.instruction_name_regex)
}

// optional int64 operand_number = 2;
inline bool HloOperandFilter::has_operand_number() const {
  bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0;
  return value;
}
inline void HloOperandFilter::clear_operand_number() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.operand_number_ = ::int64_t{0};
  _impl_._has_bits_[0] &= ~0x00000008u;
}
inline ::int64_t HloOperandFilter::operand_number() const {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.HloOperandFilter.operand_number)
  return _internal_operand_number();
}
inline void HloOperandFilter::set_operand_number(::int64_t value) {
  _internal_set_operand_number(value);
  _impl_._has_bits_[0] |= 0x00000008u;
  // @@protoc_insertion_point(field_set:xla.memory_space_assignment.HloOperandFilter.operand_number)
}
inline ::int64_t HloOperandFilter::_internal_operand_number() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  return _impl_.operand_number_;
}
inline void HloOperandFilter::_internal_set_operand_number(::int64_t value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.operand_number_ = value;
}

// optional int64 size_gte = 3;
inline bool HloOperandFilter::has_size_gte() const {
  bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0;
  return value;
}
inline void HloOperandFilter::clear_size_gte() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.size_gte_ = ::int64_t{0};
  _impl_._has_bits_[0] &= ~0x00000010u;
}
inline ::int64_t HloOperandFilter::size_gte() const {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.HloOperandFilter.size_gte)
  return _internal_size_gte();
}
inline void HloOperandFilter::set_size_gte(::int64_t value) {
  _internal_set_size_gte(value);
  _impl_._has_bits_[0] |= 0x00000010u;
  // @@protoc_insertion_point(field_set:xla.memory_space_assignment.HloOperandFilter.size_gte)
}
inline ::int64_t HloOperandFilter::_internal_size_gte() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  return _impl_.size_gte_;
}
inline void HloOperandFilter::_internal_set_size_gte(::int64_t value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.size_gte_ = value;
}

// optional int64 size_lte = 4;
inline bool HloOperandFilter::has_size_lte() const {
  bool value = (_impl_._has_bits_[0] & 0x00000020u) != 0;
  return value;
}
inline void HloOperandFilter::clear_size_lte() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.size_lte_ = ::int64_t{0};
  _impl_._has_bits_[0] &= ~0x00000020u;
}
inline ::int64_t HloOperandFilter::size_lte() const {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.HloOperandFilter.size_lte)
  return _internal_size_lte();
}
inline void HloOperandFilter::set_size_lte(::int64_t value) {
  _internal_set_size_lte(value);
  _impl_._has_bits_[0] |= 0x00000020u;
  // @@protoc_insertion_point(field_set:xla.memory_space_assignment.HloOperandFilter.size_lte)
}
inline ::int64_t HloOperandFilter::_internal_size_lte() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  return _impl_.size_lte_;
}
inline void HloOperandFilter::_internal_set_size_lte(::int64_t value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.size_lte_ = value;
}

// optional .xla.memory_space_assignment.TupleShapeIndex tuple_index = 5;
inline bool HloOperandFilter::has_tuple_index() const {
  bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0;
  PROTOBUF_ASSUME(!value || _impl_.tuple_index_ != nullptr);
  return value;
}
inline void HloOperandFilter::clear_tuple_index() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.tuple_index_ != nullptr) _impl_.tuple_index_->Clear();
  _impl_._has_bits_[0] &= ~0x00000004u;
}
inline const ::xla::memory_space_assignment::TupleShapeIndex& HloOperandFilter::_internal_tuple_index() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  const ::xla::memory_space_assignment::TupleShapeIndex* p = _impl_.tuple_index_;
  return p != nullptr ? *p : reinterpret_cast<const ::xla::memory_space_assignment::TupleShapeIndex&>(::xla::memory_space_assignment::_TupleShapeIndex_default_instance_);
}
inline const ::xla::memory_space_assignment::TupleShapeIndex& HloOperandFilter::tuple_index() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.HloOperandFilter.tuple_index)
  return _internal_tuple_index();
}
inline void HloOperandFilter::unsafe_arena_set_allocated_tuple_index(
    ::xla::memory_space_assignment::TupleShapeIndex* PROTOBUF_NULLABLE value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (GetArena() == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.tuple_index_);
  }
  _impl_.tuple_index_ = reinterpret_cast<::xla::memory_space_assignment::TupleShapeIndex*>(value);
  if (value != nullptr) {
    _impl_._has_bits_[0] |= 0x00000004u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000004u;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:xla.memory_space_assignment.HloOperandFilter.tuple_index)
}
inline ::xla::memory_space_assignment::TupleShapeIndex* PROTOBUF_NULLABLE HloOperandFilter::release_tuple_index() {
  ::google::protobuf::internal::TSanWrite(&_impl_);

  _impl_._has_bits_[0] &= ~0x00000004u;
  ::xla::memory_space_assignment::TupleShapeIndex* released = _impl_.tuple_index_;
  _impl_.tuple_index_ = nullptr;
  if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) {
    auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released);
    released = ::google::protobuf::internal::DuplicateIfNonNull(released);
    if (GetArena() == nullptr) {
      delete old;
    }
  } else {
    if (GetArena() != nullptr) {
      released = ::google::protobuf::internal::DuplicateIfNonNull(released);
    }
  }
  return released;
}
inline ::xla::memory_space_assignment::TupleShapeIndex* PROTOBUF_NULLABLE HloOperandFilter::unsafe_arena_release_tuple_index() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  // @@protoc_insertion_point(field_release:xla.memory_space_assignment.HloOperandFilter.tuple_index)

  _impl_._has_bits_[0] &= ~0x00000004u;
  ::xla::memory_space_assignment::TupleShapeIndex* temp = _impl_.tuple_index_;
  _impl_.tuple_index_ = nullptr;
  return temp;
}
inline ::xla::memory_space_assignment::TupleShapeIndex* PROTOBUF_NONNULL HloOperandFilter::_internal_mutable_tuple_index() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.tuple_index_ == nullptr) {
    auto* p = ::google::protobuf::Message::DefaultConstruct<::xla::memory_space_assignment::TupleShapeIndex>(GetArena());
    _impl_.tuple_index_ = reinterpret_cast<::xla::memory_space_assignment::TupleShapeIndex*>(p);
  }
  return _impl_.tuple_index_;
}
inline ::xla::memory_space_assignment::TupleShapeIndex* PROTOBUF_NONNULL HloOperandFilter::mutable_tuple_index()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  _impl_._has_bits_[0] |= 0x00000004u;
  ::xla::memory_space_assignment::TupleShapeIndex* _msg = _internal_mutable_tuple_index();
  // @@protoc_insertion_point(field_mutable:xla.memory_space_assignment.HloOperandFilter.tuple_index)
  return _msg;
}
inline void HloOperandFilter::set_allocated_tuple_index(::xla::memory_space_assignment::TupleShapeIndex* PROTOBUF_NULLABLE value) {
  ::google::protobuf::Arena* message_arena = GetArena();
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (message_arena == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.tuple_index_);
  }

  if (value != nullptr) {
    ::google::protobuf::Arena* submessage_arena = value->GetArena();
    if (message_arena != submessage_arena) {
      value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena);
    }
    _impl_._has_bits_[0] |= 0x00000004u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000004u;
  }

  _impl_.tuple_index_ = reinterpret_cast<::xla::memory_space_assignment::TupleShapeIndex*>(value);
  // @@protoc_insertion_point(field_set_allocated:xla.memory_space_assignment.HloOperandFilter.tuple_index)
}

// optional string instruction_regex = 6;
inline bool HloOperandFilter::has_instruction_regex() const {
  bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
  return value;
}
inline void HloOperandFilter::clear_instruction_regex() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.instruction_regex_.ClearToEmpty();
  _impl_._has_bits_[0] &= ~0x00000002u;
}
inline const ::std::string& HloOperandFilter::instruction_regex() const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.HloOperandFilter.instruction_regex)
  return _internal_instruction_regex();
}
template <typename Arg_, typename... Args_>
PROTOBUF_ALWAYS_INLINE void HloOperandFilter::set_instruction_regex(Arg_&& arg, Args_... args) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_._has_bits_[0] |= 0x00000002u;
  _impl_.instruction_regex_.Set(static_cast<Arg_&&>(arg), args..., GetArena());
  // @@protoc_insertion_point(field_set:xla.memory_space_assignment.HloOperandFilter.instruction_regex)
}
inline ::std::string* PROTOBUF_NONNULL HloOperandFilter::mutable_instruction_regex()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::std::string* _s = _internal_mutable_instruction_regex();
  // @@protoc_insertion_point(field_mutable:xla.memory_space_assignment.HloOperandFilter.instruction_regex)
  return _s;
}
inline const ::std::string& HloOperandFilter::_internal_instruction_regex() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  return _impl_.instruction_regex_.Get();
}
inline void HloOperandFilter::_internal_set_instruction_regex(const ::std::string& value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_._has_bits_[0] |= 0x00000002u;
  _impl_.instruction_regex_.Set(value, GetArena());
}
inline ::std::string* PROTOBUF_NONNULL HloOperandFilter::_internal_mutable_instruction_regex() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_._has_bits_[0] |= 0x00000002u;
  return _impl_.instruction_regex_.Mutable( GetArena());
}
inline ::std::string* PROTOBUF_NULLABLE HloOperandFilter::release_instruction_regex() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  // @@protoc_insertion_point(field_release:xla.memory_space_assignment.HloOperandFilter.instruction_regex)
  if ((_impl_._has_bits_[0] & 0x00000002u) == 0) {
    return nullptr;
  }
  _impl_._has_bits_[0] &= ~0x00000002u;
  auto* released = _impl_.instruction_regex_.Release();
  if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) {
    _impl_.instruction_regex_.Set("", GetArena());
  }
  return released;
}
inline void HloOperandFilter::set_allocated_instruction_regex(::std::string* PROTOBUF_NULLABLE value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (value != nullptr) {
    _impl_._has_bits_[0] |= 0x00000002u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000002u;
  }
  _impl_.instruction_regex_.SetAllocated(value, GetArena());
  if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.instruction_regex_.IsDefault()) {
    _impl_.instruction_regex_.Set("", GetArena());
  }
  // @@protoc_insertion_point(field_set_allocated:xla.memory_space_assignment.HloOperandFilter.instruction_regex)
}

// -------------------------------------------------------------------

// PreferredPrefetchOverrideOptions

// float prefetch_eagerness = 1;
inline bool PreferredPrefetchOverrideOptions::has_prefetch_eagerness() const {
  return options_case() == kPrefetchEagerness;
}
inline void PreferredPrefetchOverrideOptions::set_has_prefetch_eagerness() {
  _impl_._oneof_case_[0] = kPrefetchEagerness;
}
inline void PreferredPrefetchOverrideOptions::clear_prefetch_eagerness() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (options_case() == kPrefetchEagerness) {
    _impl_.options_.prefetch_eagerness_ = 0;
    clear_has_options();
  }
}
inline float PreferredPrefetchOverrideOptions::prefetch_eagerness() const {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.PreferredPrefetchOverrideOptions.prefetch_eagerness)
  return _internal_prefetch_eagerness();
}
inline void PreferredPrefetchOverrideOptions::set_prefetch_eagerness(float value) {
  if (options_case() != kPrefetchEagerness) {
    clear_options();
    set_has_prefetch_eagerness();
  }
  _impl_.options_.prefetch_eagerness_ = value;
  // @@protoc_insertion_point(field_set:xla.memory_space_assignment.PreferredPrefetchOverrideOptions.prefetch_eagerness)
}
inline float PreferredPrefetchOverrideOptions::_internal_prefetch_eagerness() const {
  if (options_case() == kPrefetchEagerness) {
    return _impl_.options_.prefetch_eagerness_;
  }
  return 0;
}

// .xla.memory_space_assignment.HloPositionMatcher after_instruction = 4;
inline bool PreferredPrefetchOverrideOptions::has_after_instruction() const {
  return options_case() == kAfterInstruction;
}
inline bool PreferredPrefetchOverrideOptions::_internal_has_after_instruction() const {
  return options_case() == kAfterInstruction;
}
inline void PreferredPrefetchOverrideOptions::set_has_after_instruction() {
  _impl_._oneof_case_[0] = kAfterInstruction;
}
inline void PreferredPrefetchOverrideOptions::clear_after_instruction() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (options_case() == kAfterInstruction) {
    if (GetArena() == nullptr) {
      delete _impl_.options_.after_instruction_;
    } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) {
      ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.options_.after_instruction_);
    }
    clear_has_options();
  }
}
inline ::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NULLABLE PreferredPrefetchOverrideOptions::release_after_instruction() {
  // @@protoc_insertion_point(field_release:xla.memory_space_assignment.PreferredPrefetchOverrideOptions.after_instruction)
  if (options_case() == kAfterInstruction) {
    clear_has_options();
    auto* temp = _impl_.options_.after_instruction_;
    if (GetArena() != nullptr) {
      temp = ::google::protobuf::internal::DuplicateIfNonNull(temp);
    }
    _impl_.options_.after_instruction_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline const ::xla::memory_space_assignment::HloPositionMatcher& PreferredPrefetchOverrideOptions::_internal_after_instruction() const {
  return options_case() == kAfterInstruction ? *_impl_.options_.after_instruction_ : reinterpret_cast<::xla::memory_space_assignment::HloPositionMatcher&>(::xla::memory_space_assignment::_HloPositionMatcher_default_instance_);
}
inline const ::xla::memory_space_assignment::HloPositionMatcher& PreferredPrefetchOverrideOptions::after_instruction() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.PreferredPrefetchOverrideOptions.after_instruction)
  return _internal_after_instruction();
}
inline ::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NULLABLE PreferredPrefetchOverrideOptions::unsafe_arena_release_after_instruction() {
  // @@protoc_insertion_point(field_unsafe_arena_release:xla.memory_space_assignment.PreferredPrefetchOverrideOptions.after_instruction)
  if (options_case() == kAfterInstruction) {
    clear_has_options();
    auto* temp = _impl_.options_.after_instruction_;
    _impl_.options_.after_instruction_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline void PreferredPrefetchOverrideOptions::unsafe_arena_set_allocated_after_instruction(
    ::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NULLABLE value) {
  // We rely on the oneof clear method to free the earlier contents
  // of this oneof. We can directly use the pointer we're given to
  // set the new value.
  clear_options();
  if (value) {
    set_has_after_instruction();
    _impl_.options_.after_instruction_ = value;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:xla.memory_space_assignment.PreferredPrefetchOverrideOptions.after_instruction)
}
inline ::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NONNULL PreferredPrefetchOverrideOptions::_internal_mutable_after_instruction() {
  if (options_case() != kAfterInstruction) {
    clear_options();
    set_has_after_instruction();
    _impl_.options_.after_instruction_ = 
        ::google::protobuf::Message::DefaultConstruct<::xla::memory_space_assignment::HloPositionMatcher>(GetArena());
  }
  return _impl_.options_.after_instruction_;
}
inline ::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NONNULL PreferredPrefetchOverrideOptions::mutable_after_instruction()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::xla::memory_space_assignment::HloPositionMatcher* _msg = _internal_mutable_after_instruction();
  // @@protoc_insertion_point(field_mutable:xla.memory_space_assignment.PreferredPrefetchOverrideOptions.after_instruction)
  return _msg;
}

// .xla.memory_space_assignment.HloPositionMatcher before_instruction = 5;
inline bool PreferredPrefetchOverrideOptions::has_before_instruction() const {
  return options_case() == kBeforeInstruction;
}
inline bool PreferredPrefetchOverrideOptions::_internal_has_before_instruction() const {
  return options_case() == kBeforeInstruction;
}
inline void PreferredPrefetchOverrideOptions::set_has_before_instruction() {
  _impl_._oneof_case_[0] = kBeforeInstruction;
}
inline void PreferredPrefetchOverrideOptions::clear_before_instruction() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (options_case() == kBeforeInstruction) {
    if (GetArena() == nullptr) {
      delete _impl_.options_.before_instruction_;
    } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) {
      ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.options_.before_instruction_);
    }
    clear_has_options();
  }
}
inline ::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NULLABLE PreferredPrefetchOverrideOptions::release_before_instruction() {
  // @@protoc_insertion_point(field_release:xla.memory_space_assignment.PreferredPrefetchOverrideOptions.before_instruction)
  if (options_case() == kBeforeInstruction) {
    clear_has_options();
    auto* temp = _impl_.options_.before_instruction_;
    if (GetArena() != nullptr) {
      temp = ::google::protobuf::internal::DuplicateIfNonNull(temp);
    }
    _impl_.options_.before_instruction_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline const ::xla::memory_space_assignment::HloPositionMatcher& PreferredPrefetchOverrideOptions::_internal_before_instruction() const {
  return options_case() == kBeforeInstruction ? *_impl_.options_.before_instruction_ : reinterpret_cast<::xla::memory_space_assignment::HloPositionMatcher&>(::xla::memory_space_assignment::_HloPositionMatcher_default_instance_);
}
inline const ::xla::memory_space_assignment::HloPositionMatcher& PreferredPrefetchOverrideOptions::before_instruction() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.PreferredPrefetchOverrideOptions.before_instruction)
  return _internal_before_instruction();
}
inline ::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NULLABLE PreferredPrefetchOverrideOptions::unsafe_arena_release_before_instruction() {
  // @@protoc_insertion_point(field_unsafe_arena_release:xla.memory_space_assignment.PreferredPrefetchOverrideOptions.before_instruction)
  if (options_case() == kBeforeInstruction) {
    clear_has_options();
    auto* temp = _impl_.options_.before_instruction_;
    _impl_.options_.before_instruction_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline void PreferredPrefetchOverrideOptions::unsafe_arena_set_allocated_before_instruction(
    ::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NULLABLE value) {
  // We rely on the oneof clear method to free the earlier contents
  // of this oneof. We can directly use the pointer we're given to
  // set the new value.
  clear_options();
  if (value) {
    set_has_before_instruction();
    _impl_.options_.before_instruction_ = value;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:xla.memory_space_assignment.PreferredPrefetchOverrideOptions.before_instruction)
}
inline ::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NONNULL PreferredPrefetchOverrideOptions::_internal_mutable_before_instruction() {
  if (options_case() != kBeforeInstruction) {
    clear_options();
    set_has_before_instruction();
    _impl_.options_.before_instruction_ = 
        ::google::protobuf::Message::DefaultConstruct<::xla::memory_space_assignment::HloPositionMatcher>(GetArena());
  }
  return _impl_.options_.before_instruction_;
}
inline ::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NONNULL PreferredPrefetchOverrideOptions::mutable_before_instruction()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::xla::memory_space_assignment::HloPositionMatcher* _msg = _internal_mutable_before_instruction();
  // @@protoc_insertion_point(field_mutable:xla.memory_space_assignment.PreferredPrefetchOverrideOptions.before_instruction)
  return _msg;
}

inline bool PreferredPrefetchOverrideOptions::has_options() const {
  return options_case() != OPTIONS_NOT_SET;
}
inline void PreferredPrefetchOverrideOptions::clear_has_options() {
  _impl_._oneof_case_[0] = OPTIONS_NOT_SET;
}
inline PreferredPrefetchOverrideOptions::OptionsCase PreferredPrefetchOverrideOptions::options_case() const {
  return PreferredPrefetchOverrideOptions::OptionsCase(_impl_._oneof_case_[0]);
}
// -------------------------------------------------------------------

// PreferredPrefetchOverride

// optional .xla.memory_space_assignment.HloOperandFilter hlo_operand_filter = 1;
inline bool PreferredPrefetchOverride::has_hlo_operand_filter() const {
  bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
  PROTOBUF_ASSUME(!value || _impl_.hlo_operand_filter_ != nullptr);
  return value;
}
inline void PreferredPrefetchOverride::clear_hlo_operand_filter() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.hlo_operand_filter_ != nullptr) _impl_.hlo_operand_filter_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
inline const ::xla::memory_space_assignment::HloOperandFilter& PreferredPrefetchOverride::_internal_hlo_operand_filter() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  const ::xla::memory_space_assignment::HloOperandFilter* p = _impl_.hlo_operand_filter_;
  return p != nullptr ? *p : reinterpret_cast<const ::xla::memory_space_assignment::HloOperandFilter&>(::xla::memory_space_assignment::_HloOperandFilter_default_instance_);
}
inline const ::xla::memory_space_assignment::HloOperandFilter& PreferredPrefetchOverride::hlo_operand_filter() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.PreferredPrefetchOverride.hlo_operand_filter)
  return _internal_hlo_operand_filter();
}
inline void PreferredPrefetchOverride::unsafe_arena_set_allocated_hlo_operand_filter(
    ::xla::memory_space_assignment::HloOperandFilter* PROTOBUF_NULLABLE value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (GetArena() == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.hlo_operand_filter_);
  }
  _impl_.hlo_operand_filter_ = reinterpret_cast<::xla::memory_space_assignment::HloOperandFilter*>(value);
  if (value != nullptr) {
    _impl_._has_bits_[0] |= 0x00000001u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000001u;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:xla.memory_space_assignment.PreferredPrefetchOverride.hlo_operand_filter)
}
inline ::xla::memory_space_assignment::HloOperandFilter* PROTOBUF_NULLABLE PreferredPrefetchOverride::release_hlo_operand_filter() {
  ::google::protobuf::internal::TSanWrite(&_impl_);

  _impl_._has_bits_[0] &= ~0x00000001u;
  ::xla::memory_space_assignment::HloOperandFilter* released = _impl_.hlo_operand_filter_;
  _impl_.hlo_operand_filter_ = nullptr;
  if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) {
    auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released);
    released = ::google::protobuf::internal::DuplicateIfNonNull(released);
    if (GetArena() == nullptr) {
      delete old;
    }
  } else {
    if (GetArena() != nullptr) {
      released = ::google::protobuf::internal::DuplicateIfNonNull(released);
    }
  }
  return released;
}
inline ::xla::memory_space_assignment::HloOperandFilter* PROTOBUF_NULLABLE PreferredPrefetchOverride::unsafe_arena_release_hlo_operand_filter() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  // @@protoc_insertion_point(field_release:xla.memory_space_assignment.PreferredPrefetchOverride.hlo_operand_filter)

  _impl_._has_bits_[0] &= ~0x00000001u;
  ::xla::memory_space_assignment::HloOperandFilter* temp = _impl_.hlo_operand_filter_;
  _impl_.hlo_operand_filter_ = nullptr;
  return temp;
}
inline ::xla::memory_space_assignment::HloOperandFilter* PROTOBUF_NONNULL PreferredPrefetchOverride::_internal_mutable_hlo_operand_filter() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.hlo_operand_filter_ == nullptr) {
    auto* p = ::google::protobuf::Message::DefaultConstruct<::xla::memory_space_assignment::HloOperandFilter>(GetArena());
    _impl_.hlo_operand_filter_ = reinterpret_cast<::xla::memory_space_assignment::HloOperandFilter*>(p);
  }
  return _impl_.hlo_operand_filter_;
}
inline ::xla::memory_space_assignment::HloOperandFilter* PROTOBUF_NONNULL PreferredPrefetchOverride::mutable_hlo_operand_filter()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  _impl_._has_bits_[0] |= 0x00000001u;
  ::xla::memory_space_assignment::HloOperandFilter* _msg = _internal_mutable_hlo_operand_filter();
  // @@protoc_insertion_point(field_mutable:xla.memory_space_assignment.PreferredPrefetchOverride.hlo_operand_filter)
  return _msg;
}
inline void PreferredPrefetchOverride::set_allocated_hlo_operand_filter(::xla::memory_space_assignment::HloOperandFilter* PROTOBUF_NULLABLE value) {
  ::google::protobuf::Arena* message_arena = GetArena();
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (message_arena == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.hlo_operand_filter_);
  }

  if (value != nullptr) {
    ::google::protobuf::Arena* submessage_arena = value->GetArena();
    if (message_arena != submessage_arena) {
      value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena);
    }
    _impl_._has_bits_[0] |= 0x00000001u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000001u;
  }

  _impl_.hlo_operand_filter_ = reinterpret_cast<::xla::memory_space_assignment::HloOperandFilter*>(value);
  // @@protoc_insertion_point(field_set_allocated:xla.memory_space_assignment.PreferredPrefetchOverride.hlo_operand_filter)
}

// optional .xla.memory_space_assignment.PreferredPrefetchOverrideOptions override_options = 2;
inline bool PreferredPrefetchOverride::has_override_options() const {
  bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
  PROTOBUF_ASSUME(!value || _impl_.override_options_ != nullptr);
  return value;
}
inline void PreferredPrefetchOverride::clear_override_options() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.override_options_ != nullptr) _impl_.override_options_->Clear();
  _impl_._has_bits_[0] &= ~0x00000002u;
}
inline const ::xla::memory_space_assignment::PreferredPrefetchOverrideOptions& PreferredPrefetchOverride::_internal_override_options() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  const ::xla::memory_space_assignment::PreferredPrefetchOverrideOptions* p = _impl_.override_options_;
  return p != nullptr ? *p : reinterpret_cast<const ::xla::memory_space_assignment::PreferredPrefetchOverrideOptions&>(::xla::memory_space_assignment::_PreferredPrefetchOverrideOptions_default_instance_);
}
inline const ::xla::memory_space_assignment::PreferredPrefetchOverrideOptions& PreferredPrefetchOverride::override_options() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.PreferredPrefetchOverride.override_options)
  return _internal_override_options();
}
inline void PreferredPrefetchOverride::unsafe_arena_set_allocated_override_options(
    ::xla::memory_space_assignment::PreferredPrefetchOverrideOptions* PROTOBUF_NULLABLE value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (GetArena() == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.override_options_);
  }
  _impl_.override_options_ = reinterpret_cast<::xla::memory_space_assignment::PreferredPrefetchOverrideOptions*>(value);
  if (value != nullptr) {
    _impl_._has_bits_[0] |= 0x00000002u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000002u;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:xla.memory_space_assignment.PreferredPrefetchOverride.override_options)
}
inline ::xla::memory_space_assignment::PreferredPrefetchOverrideOptions* PROTOBUF_NULLABLE PreferredPrefetchOverride::release_override_options() {
  ::google::protobuf::internal::TSanWrite(&_impl_);

  _impl_._has_bits_[0] &= ~0x00000002u;
  ::xla::memory_space_assignment::PreferredPrefetchOverrideOptions* released = _impl_.override_options_;
  _impl_.override_options_ = nullptr;
  if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) {
    auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released);
    released = ::google::protobuf::internal::DuplicateIfNonNull(released);
    if (GetArena() == nullptr) {
      delete old;
    }
  } else {
    if (GetArena() != nullptr) {
      released = ::google::protobuf::internal::DuplicateIfNonNull(released);
    }
  }
  return released;
}
inline ::xla::memory_space_assignment::PreferredPrefetchOverrideOptions* PROTOBUF_NULLABLE PreferredPrefetchOverride::unsafe_arena_release_override_options() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  // @@protoc_insertion_point(field_release:xla.memory_space_assignment.PreferredPrefetchOverride.override_options)

  _impl_._has_bits_[0] &= ~0x00000002u;
  ::xla::memory_space_assignment::PreferredPrefetchOverrideOptions* temp = _impl_.override_options_;
  _impl_.override_options_ = nullptr;
  return temp;
}
inline ::xla::memory_space_assignment::PreferredPrefetchOverrideOptions* PROTOBUF_NONNULL PreferredPrefetchOverride::_internal_mutable_override_options() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.override_options_ == nullptr) {
    auto* p = ::google::protobuf::Message::DefaultConstruct<::xla::memory_space_assignment::PreferredPrefetchOverrideOptions>(GetArena());
    _impl_.override_options_ = reinterpret_cast<::xla::memory_space_assignment::PreferredPrefetchOverrideOptions*>(p);
  }
  return _impl_.override_options_;
}
inline ::xla::memory_space_assignment::PreferredPrefetchOverrideOptions* PROTOBUF_NONNULL PreferredPrefetchOverride::mutable_override_options()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  _impl_._has_bits_[0] |= 0x00000002u;
  ::xla::memory_space_assignment::PreferredPrefetchOverrideOptions* _msg = _internal_mutable_override_options();
  // @@protoc_insertion_point(field_mutable:xla.memory_space_assignment.PreferredPrefetchOverride.override_options)
  return _msg;
}
inline void PreferredPrefetchOverride::set_allocated_override_options(::xla::memory_space_assignment::PreferredPrefetchOverrideOptions* PROTOBUF_NULLABLE value) {
  ::google::protobuf::Arena* message_arena = GetArena();
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (message_arena == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.override_options_);
  }

  if (value != nullptr) {
    ::google::protobuf::Arena* submessage_arena = value->GetArena();
    if (message_arena != submessage_arena) {
      value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena);
    }
    _impl_._has_bits_[0] |= 0x00000002u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000002u;
  }

  _impl_.override_options_ = reinterpret_cast<::xla::memory_space_assignment::PreferredPrefetchOverrideOptions*>(value);
  // @@protoc_insertion_point(field_set_allocated:xla.memory_space_assignment.PreferredPrefetchOverride.override_options)
}

// -------------------------------------------------------------------

// PreferredPrefetchOverrides

// repeated .xla.memory_space_assignment.PreferredPrefetchOverride overrides = 1;
inline int PreferredPrefetchOverrides::_internal_overrides_size() const {
  return _internal_overrides().size();
}
inline int PreferredPrefetchOverrides::overrides_size() const {
  return _internal_overrides_size();
}
inline void PreferredPrefetchOverrides::clear_overrides() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.overrides_.Clear();
}
inline ::xla::memory_space_assignment::PreferredPrefetchOverride* PROTOBUF_NONNULL PreferredPrefetchOverrides::mutable_overrides(int index)
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_mutable:xla.memory_space_assignment.PreferredPrefetchOverrides.overrides)
  return _internal_mutable_overrides()->Mutable(index);
}
inline ::google::protobuf::RepeatedPtrField<::xla::memory_space_assignment::PreferredPrefetchOverride>* PROTOBUF_NONNULL PreferredPrefetchOverrides::mutable_overrides()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_mutable_list:xla.memory_space_assignment.PreferredPrefetchOverrides.overrides)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  return _internal_mutable_overrides();
}
inline const ::xla::memory_space_assignment::PreferredPrefetchOverride& PreferredPrefetchOverrides::overrides(int index) const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.PreferredPrefetchOverrides.overrides)
  return _internal_overrides().Get(index);
}
inline ::xla::memory_space_assignment::PreferredPrefetchOverride* PROTOBUF_NONNULL PreferredPrefetchOverrides::add_overrides()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  ::xla::memory_space_assignment::PreferredPrefetchOverride* _add = _internal_mutable_overrides()->Add();
  // @@protoc_insertion_point(field_add:xla.memory_space_assignment.PreferredPrefetchOverrides.overrides)
  return _add;
}
inline const ::google::protobuf::RepeatedPtrField<::xla::memory_space_assignment::PreferredPrefetchOverride>& PreferredPrefetchOverrides::overrides() const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_list:xla.memory_space_assignment.PreferredPrefetchOverrides.overrides)
  return _internal_overrides();
}
inline const ::google::protobuf::RepeatedPtrField<::xla::memory_space_assignment::PreferredPrefetchOverride>&
PreferredPrefetchOverrides::_internal_overrides() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  return _impl_.overrides_;
}
inline ::google::protobuf::RepeatedPtrField<::xla::memory_space_assignment::PreferredPrefetchOverride>* PROTOBUF_NONNULL
PreferredPrefetchOverrides::_internal_mutable_overrides() {
  ::google::protobuf::internal::TSanRead(&_impl_);
  return &_impl_.overrides_;
}

// -------------------------------------------------------------------

// HloRandomFilter

// optional int64 seed = 1;
inline bool HloRandomFilter::has_seed() const {
  bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
  return value;
}
inline void HloRandomFilter::clear_seed() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.seed_ = ::int64_t{0};
  _impl_._has_bits_[0] &= ~0x00000001u;
}
inline ::int64_t HloRandomFilter::seed() const {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.HloRandomFilter.seed)
  return _internal_seed();
}
inline void HloRandomFilter::set_seed(::int64_t value) {
  _internal_set_seed(value);
  _impl_._has_bits_[0] |= 0x00000001u;
  // @@protoc_insertion_point(field_set:xla.memory_space_assignment.HloRandomFilter.seed)
}
inline ::int64_t HloRandomFilter::_internal_seed() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  return _impl_.seed_;
}
inline void HloRandomFilter::_internal_set_seed(::int64_t value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.seed_ = value;
}

// optional double selection_range_begin = 2;
inline bool HloRandomFilter::has_selection_range_begin() const {
  bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
  return value;
}
inline void HloRandomFilter::clear_selection_range_begin() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.selection_range_begin_ = 0;
  _impl_._has_bits_[0] &= ~0x00000002u;
}
inline double HloRandomFilter::selection_range_begin() const {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.HloRandomFilter.selection_range_begin)
  return _internal_selection_range_begin();
}
inline void HloRandomFilter::set_selection_range_begin(double value) {
  _internal_set_selection_range_begin(value);
  _impl_._has_bits_[0] |= 0x00000002u;
  // @@protoc_insertion_point(field_set:xla.memory_space_assignment.HloRandomFilter.selection_range_begin)
}
inline double HloRandomFilter::_internal_selection_range_begin() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  return _impl_.selection_range_begin_;
}
inline void HloRandomFilter::_internal_set_selection_range_begin(double value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.selection_range_begin_ = value;
}

// optional double selection_range_end = 3;
inline bool HloRandomFilter::has_selection_range_end() const {
  bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0;
  return value;
}
inline void HloRandomFilter::clear_selection_range_end() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.selection_range_end_ = 0;
  _impl_._has_bits_[0] &= ~0x00000004u;
}
inline double HloRandomFilter::selection_range_end() const {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.HloRandomFilter.selection_range_end)
  return _internal_selection_range_end();
}
inline void HloRandomFilter::set_selection_range_end(double value) {
  _internal_set_selection_range_end(value);
  _impl_._has_bits_[0] |= 0x00000004u;
  // @@protoc_insertion_point(field_set:xla.memory_space_assignment.HloRandomFilter.selection_range_end)
}
inline double HloRandomFilter::_internal_selection_range_end() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  return _impl_.selection_range_end_;
}
inline void HloRandomFilter::_internal_set_selection_range_end(double value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.selection_range_end_ = value;
}

// -------------------------------------------------------------------

// HloPositionMatcher

// optional string instruction_regex = 1;
inline bool HloPositionMatcher::has_instruction_regex() const {
  bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
  return value;
}
inline void HloPositionMatcher::clear_instruction_regex() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.instruction_regex_.ClearToEmpty();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
inline const ::std::string& HloPositionMatcher::instruction_regex() const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.HloPositionMatcher.instruction_regex)
  return _internal_instruction_regex();
}
template <typename Arg_, typename... Args_>
PROTOBUF_ALWAYS_INLINE void HloPositionMatcher::set_instruction_regex(Arg_&& arg, Args_... args) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_._has_bits_[0] |= 0x00000001u;
  _impl_.instruction_regex_.Set(static_cast<Arg_&&>(arg), args..., GetArena());
  // @@protoc_insertion_point(field_set:xla.memory_space_assignment.HloPositionMatcher.instruction_regex)
}
inline ::std::string* PROTOBUF_NONNULL HloPositionMatcher::mutable_instruction_regex()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::std::string* _s = _internal_mutable_instruction_regex();
  // @@protoc_insertion_point(field_mutable:xla.memory_space_assignment.HloPositionMatcher.instruction_regex)
  return _s;
}
inline const ::std::string& HloPositionMatcher::_internal_instruction_regex() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  return _impl_.instruction_regex_.Get();
}
inline void HloPositionMatcher::_internal_set_instruction_regex(const ::std::string& value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_._has_bits_[0] |= 0x00000001u;
  _impl_.instruction_regex_.Set(value, GetArena());
}
inline ::std::string* PROTOBUF_NONNULL HloPositionMatcher::_internal_mutable_instruction_regex() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_._has_bits_[0] |= 0x00000001u;
  return _impl_.instruction_regex_.Mutable( GetArena());
}
inline ::std::string* PROTOBUF_NULLABLE HloPositionMatcher::release_instruction_regex() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  // @@protoc_insertion_point(field_release:xla.memory_space_assignment.HloPositionMatcher.instruction_regex)
  if ((_impl_._has_bits_[0] & 0x00000001u) == 0) {
    return nullptr;
  }
  _impl_._has_bits_[0] &= ~0x00000001u;
  auto* released = _impl_.instruction_regex_.Release();
  if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) {
    _impl_.instruction_regex_.Set("", GetArena());
  }
  return released;
}
inline void HloPositionMatcher::set_allocated_instruction_regex(::std::string* PROTOBUF_NULLABLE value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (value != nullptr) {
    _impl_._has_bits_[0] |= 0x00000001u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000001u;
  }
  _impl_.instruction_regex_.SetAllocated(value, GetArena());
  if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.instruction_regex_.IsDefault()) {
    _impl_.instruction_regex_.Set("", GetArena());
  }
  // @@protoc_insertion_point(field_set_allocated:xla.memory_space_assignment.HloPositionMatcher.instruction_regex)
}

// optional string instruction_name_regex = 2;
inline bool HloPositionMatcher::has_instruction_name_regex() const {
  bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
  return value;
}
inline void HloPositionMatcher::clear_instruction_name_regex() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.instruction_name_regex_.ClearToEmpty();
  _impl_._has_bits_[0] &= ~0x00000002u;
}
inline const ::std::string& HloPositionMatcher::instruction_name_regex() const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.HloPositionMatcher.instruction_name_regex)
  return _internal_instruction_name_regex();
}
template <typename Arg_, typename... Args_>
PROTOBUF_ALWAYS_INLINE void HloPositionMatcher::set_instruction_name_regex(Arg_&& arg, Args_... args) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_._has_bits_[0] |= 0x00000002u;
  _impl_.instruction_name_regex_.Set(static_cast<Arg_&&>(arg), args..., GetArena());
  // @@protoc_insertion_point(field_set:xla.memory_space_assignment.HloPositionMatcher.instruction_name_regex)
}
inline ::std::string* PROTOBUF_NONNULL HloPositionMatcher::mutable_instruction_name_regex()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::std::string* _s = _internal_mutable_instruction_name_regex();
  // @@protoc_insertion_point(field_mutable:xla.memory_space_assignment.HloPositionMatcher.instruction_name_regex)
  return _s;
}
inline const ::std::string& HloPositionMatcher::_internal_instruction_name_regex() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  return _impl_.instruction_name_regex_.Get();
}
inline void HloPositionMatcher::_internal_set_instruction_name_regex(const ::std::string& value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_._has_bits_[0] |= 0x00000002u;
  _impl_.instruction_name_regex_.Set(value, GetArena());
}
inline ::std::string* PROTOBUF_NONNULL HloPositionMatcher::_internal_mutable_instruction_name_regex() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_._has_bits_[0] |= 0x00000002u;
  return _impl_.instruction_name_regex_.Mutable( GetArena());
}
inline ::std::string* PROTOBUF_NULLABLE HloPositionMatcher::release_instruction_name_regex() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  // @@protoc_insertion_point(field_release:xla.memory_space_assignment.HloPositionMatcher.instruction_name_regex)
  if ((_impl_._has_bits_[0] & 0x00000002u) == 0) {
    return nullptr;
  }
  _impl_._has_bits_[0] &= ~0x00000002u;
  auto* released = _impl_.instruction_name_regex_.Release();
  if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) {
    _impl_.instruction_name_regex_.Set("", GetArena());
  }
  return released;
}
inline void HloPositionMatcher::set_allocated_instruction_name_regex(::std::string* PROTOBUF_NULLABLE value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (value != nullptr) {
    _impl_._has_bits_[0] |= 0x00000002u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000002u;
  }
  _impl_.instruction_name_regex_.SetAllocated(value, GetArena());
  if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.instruction_name_regex_.IsDefault()) {
    _impl_.instruction_name_regex_.Set("", GetArena());
  }
  // @@protoc_insertion_point(field_set_allocated:xla.memory_space_assignment.HloPositionMatcher.instruction_name_regex)
}

// optional .xla.memory_space_assignment.TupleShapeIndex tuple_index = 3;
inline bool HloPositionMatcher::has_tuple_index() const {
  bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0;
  PROTOBUF_ASSUME(!value || _impl_.tuple_index_ != nullptr);
  return value;
}
inline void HloPositionMatcher::clear_tuple_index() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.tuple_index_ != nullptr) _impl_.tuple_index_->Clear();
  _impl_._has_bits_[0] &= ~0x00000004u;
}
inline const ::xla::memory_space_assignment::TupleShapeIndex& HloPositionMatcher::_internal_tuple_index() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  const ::xla::memory_space_assignment::TupleShapeIndex* p = _impl_.tuple_index_;
  return p != nullptr ? *p : reinterpret_cast<const ::xla::memory_space_assignment::TupleShapeIndex&>(::xla::memory_space_assignment::_TupleShapeIndex_default_instance_);
}
inline const ::xla::memory_space_assignment::TupleShapeIndex& HloPositionMatcher::tuple_index() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.HloPositionMatcher.tuple_index)
  return _internal_tuple_index();
}
inline void HloPositionMatcher::unsafe_arena_set_allocated_tuple_index(
    ::xla::memory_space_assignment::TupleShapeIndex* PROTOBUF_NULLABLE value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (GetArena() == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.tuple_index_);
  }
  _impl_.tuple_index_ = reinterpret_cast<::xla::memory_space_assignment::TupleShapeIndex*>(value);
  if (value != nullptr) {
    _impl_._has_bits_[0] |= 0x00000004u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000004u;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:xla.memory_space_assignment.HloPositionMatcher.tuple_index)
}
inline ::xla::memory_space_assignment::TupleShapeIndex* PROTOBUF_NULLABLE HloPositionMatcher::release_tuple_index() {
  ::google::protobuf::internal::TSanWrite(&_impl_);

  _impl_._has_bits_[0] &= ~0x00000004u;
  ::xla::memory_space_assignment::TupleShapeIndex* released = _impl_.tuple_index_;
  _impl_.tuple_index_ = nullptr;
  if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) {
    auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released);
    released = ::google::protobuf::internal::DuplicateIfNonNull(released);
    if (GetArena() == nullptr) {
      delete old;
    }
  } else {
    if (GetArena() != nullptr) {
      released = ::google::protobuf::internal::DuplicateIfNonNull(released);
    }
  }
  return released;
}
inline ::xla::memory_space_assignment::TupleShapeIndex* PROTOBUF_NULLABLE HloPositionMatcher::unsafe_arena_release_tuple_index() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  // @@protoc_insertion_point(field_release:xla.memory_space_assignment.HloPositionMatcher.tuple_index)

  _impl_._has_bits_[0] &= ~0x00000004u;
  ::xla::memory_space_assignment::TupleShapeIndex* temp = _impl_.tuple_index_;
  _impl_.tuple_index_ = nullptr;
  return temp;
}
inline ::xla::memory_space_assignment::TupleShapeIndex* PROTOBUF_NONNULL HloPositionMatcher::_internal_mutable_tuple_index() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.tuple_index_ == nullptr) {
    auto* p = ::google::protobuf::Message::DefaultConstruct<::xla::memory_space_assignment::TupleShapeIndex>(GetArena());
    _impl_.tuple_index_ = reinterpret_cast<::xla::memory_space_assignment::TupleShapeIndex*>(p);
  }
  return _impl_.tuple_index_;
}
inline ::xla::memory_space_assignment::TupleShapeIndex* PROTOBUF_NONNULL HloPositionMatcher::mutable_tuple_index()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  _impl_._has_bits_[0] |= 0x00000004u;
  ::xla::memory_space_assignment::TupleShapeIndex* _msg = _internal_mutable_tuple_index();
  // @@protoc_insertion_point(field_mutable:xla.memory_space_assignment.HloPositionMatcher.tuple_index)
  return _msg;
}
inline void HloPositionMatcher::set_allocated_tuple_index(::xla::memory_space_assignment::TupleShapeIndex* PROTOBUF_NULLABLE value) {
  ::google::protobuf::Arena* message_arena = GetArena();
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (message_arena == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.tuple_index_);
  }

  if (value != nullptr) {
    ::google::protobuf::Arena* submessage_arena = value->GetArena();
    if (message_arena != submessage_arena) {
      value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena);
    }
    _impl_._has_bits_[0] |= 0x00000004u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000004u;
  }

  _impl_.tuple_index_ = reinterpret_cast<::xla::memory_space_assignment::TupleShapeIndex*>(value);
  // @@protoc_insertion_point(field_set_allocated:xla.memory_space_assignment.HloPositionMatcher.tuple_index)
}

// optional int64 size_gte = 4;
inline bool HloPositionMatcher::has_size_gte() const {
  bool value = (_impl_._has_bits_[0] & 0x00000020u) != 0;
  return value;
}
inline void HloPositionMatcher::clear_size_gte() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.size_gte_ = ::int64_t{0};
  _impl_._has_bits_[0] &= ~0x00000020u;
}
inline ::int64_t HloPositionMatcher::size_gte() const {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.HloPositionMatcher.size_gte)
  return _internal_size_gte();
}
inline void HloPositionMatcher::set_size_gte(::int64_t value) {
  _internal_set_size_gte(value);
  _impl_._has_bits_[0] |= 0x00000020u;
  // @@protoc_insertion_point(field_set:xla.memory_space_assignment.HloPositionMatcher.size_gte)
}
inline ::int64_t HloPositionMatcher::_internal_size_gte() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  return _impl_.size_gte_;
}
inline void HloPositionMatcher::_internal_set_size_gte(::int64_t value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.size_gte_ = value;
}

// optional int64 size_lte = 5;
inline bool HloPositionMatcher::has_size_lte() const {
  bool value = (_impl_._has_bits_[0] & 0x00000040u) != 0;
  return value;
}
inline void HloPositionMatcher::clear_size_lte() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.size_lte_ = ::int64_t{0};
  _impl_._has_bits_[0] &= ~0x00000040u;
}
inline ::int64_t HloPositionMatcher::size_lte() const {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.HloPositionMatcher.size_lte)
  return _internal_size_lte();
}
inline void HloPositionMatcher::set_size_lte(::int64_t value) {
  _internal_set_size_lte(value);
  _impl_._has_bits_[0] |= 0x00000040u;
  // @@protoc_insertion_point(field_set:xla.memory_space_assignment.HloPositionMatcher.size_lte)
}
inline ::int64_t HloPositionMatcher::_internal_size_lte() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  return _impl_.size_lte_;
}
inline void HloPositionMatcher::_internal_set_size_lte(::int64_t value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.size_lte_ = value;
}

// optional .xla.memory_space_assignment.HloOperandFilter hlo_use_filter = 6;
inline bool HloPositionMatcher::has_hlo_use_filter() const {
  bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0;
  PROTOBUF_ASSUME(!value || _impl_.hlo_use_filter_ != nullptr);
  return value;
}
inline void HloPositionMatcher::clear_hlo_use_filter() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.hlo_use_filter_ != nullptr) _impl_.hlo_use_filter_->Clear();
  _impl_._has_bits_[0] &= ~0x00000008u;
}
inline const ::xla::memory_space_assignment::HloOperandFilter& HloPositionMatcher::_internal_hlo_use_filter() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  const ::xla::memory_space_assignment::HloOperandFilter* p = _impl_.hlo_use_filter_;
  return p != nullptr ? *p : reinterpret_cast<const ::xla::memory_space_assignment::HloOperandFilter&>(::xla::memory_space_assignment::_HloOperandFilter_default_instance_);
}
inline const ::xla::memory_space_assignment::HloOperandFilter& HloPositionMatcher::hlo_use_filter() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.HloPositionMatcher.hlo_use_filter)
  return _internal_hlo_use_filter();
}
inline void HloPositionMatcher::unsafe_arena_set_allocated_hlo_use_filter(
    ::xla::memory_space_assignment::HloOperandFilter* PROTOBUF_NULLABLE value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (GetArena() == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.hlo_use_filter_);
  }
  _impl_.hlo_use_filter_ = reinterpret_cast<::xla::memory_space_assignment::HloOperandFilter*>(value);
  if (value != nullptr) {
    _impl_._has_bits_[0] |= 0x00000008u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000008u;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:xla.memory_space_assignment.HloPositionMatcher.hlo_use_filter)
}
inline ::xla::memory_space_assignment::HloOperandFilter* PROTOBUF_NULLABLE HloPositionMatcher::release_hlo_use_filter() {
  ::google::protobuf::internal::TSanWrite(&_impl_);

  _impl_._has_bits_[0] &= ~0x00000008u;
  ::xla::memory_space_assignment::HloOperandFilter* released = _impl_.hlo_use_filter_;
  _impl_.hlo_use_filter_ = nullptr;
  if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) {
    auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released);
    released = ::google::protobuf::internal::DuplicateIfNonNull(released);
    if (GetArena() == nullptr) {
      delete old;
    }
  } else {
    if (GetArena() != nullptr) {
      released = ::google::protobuf::internal::DuplicateIfNonNull(released);
    }
  }
  return released;
}
inline ::xla::memory_space_assignment::HloOperandFilter* PROTOBUF_NULLABLE HloPositionMatcher::unsafe_arena_release_hlo_use_filter() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  // @@protoc_insertion_point(field_release:xla.memory_space_assignment.HloPositionMatcher.hlo_use_filter)

  _impl_._has_bits_[0] &= ~0x00000008u;
  ::xla::memory_space_assignment::HloOperandFilter* temp = _impl_.hlo_use_filter_;
  _impl_.hlo_use_filter_ = nullptr;
  return temp;
}
inline ::xla::memory_space_assignment::HloOperandFilter* PROTOBUF_NONNULL HloPositionMatcher::_internal_mutable_hlo_use_filter() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.hlo_use_filter_ == nullptr) {
    auto* p = ::google::protobuf::Message::DefaultConstruct<::xla::memory_space_assignment::HloOperandFilter>(GetArena());
    _impl_.hlo_use_filter_ = reinterpret_cast<::xla::memory_space_assignment::HloOperandFilter*>(p);
  }
  return _impl_.hlo_use_filter_;
}
inline ::xla::memory_space_assignment::HloOperandFilter* PROTOBUF_NONNULL HloPositionMatcher::mutable_hlo_use_filter()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  _impl_._has_bits_[0] |= 0x00000008u;
  ::xla::memory_space_assignment::HloOperandFilter* _msg = _internal_mutable_hlo_use_filter();
  // @@protoc_insertion_point(field_mutable:xla.memory_space_assignment.HloPositionMatcher.hlo_use_filter)
  return _msg;
}
inline void HloPositionMatcher::set_allocated_hlo_use_filter(::xla::memory_space_assignment::HloOperandFilter* PROTOBUF_NULLABLE value) {
  ::google::protobuf::Arena* message_arena = GetArena();
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (message_arena == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.hlo_use_filter_);
  }

  if (value != nullptr) {
    ::google::protobuf::Arena* submessage_arena = value->GetArena();
    if (message_arena != submessage_arena) {
      value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena);
    }
    _impl_._has_bits_[0] |= 0x00000008u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000008u;
  }

  _impl_.hlo_use_filter_ = reinterpret_cast<::xla::memory_space_assignment::HloOperandFilter*>(value);
  // @@protoc_insertion_point(field_set_allocated:xla.memory_space_assignment.HloPositionMatcher.hlo_use_filter)
}

// optional .xla.memory_space_assignment.HloRandomFilter hlo_random_filter = 7;
inline bool HloPositionMatcher::has_hlo_random_filter() const {
  bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0;
  PROTOBUF_ASSUME(!value || _impl_.hlo_random_filter_ != nullptr);
  return value;
}
inline void HloPositionMatcher::clear_hlo_random_filter() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.hlo_random_filter_ != nullptr) _impl_.hlo_random_filter_->Clear();
  _impl_._has_bits_[0] &= ~0x00000010u;
}
inline const ::xla::memory_space_assignment::HloRandomFilter& HloPositionMatcher::_internal_hlo_random_filter() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  const ::xla::memory_space_assignment::HloRandomFilter* p = _impl_.hlo_random_filter_;
  return p != nullptr ? *p : reinterpret_cast<const ::xla::memory_space_assignment::HloRandomFilter&>(::xla::memory_space_assignment::_HloRandomFilter_default_instance_);
}
inline const ::xla::memory_space_assignment::HloRandomFilter& HloPositionMatcher::hlo_random_filter() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.HloPositionMatcher.hlo_random_filter)
  return _internal_hlo_random_filter();
}
inline void HloPositionMatcher::unsafe_arena_set_allocated_hlo_random_filter(
    ::xla::memory_space_assignment::HloRandomFilter* PROTOBUF_NULLABLE value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (GetArena() == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.hlo_random_filter_);
  }
  _impl_.hlo_random_filter_ = reinterpret_cast<::xla::memory_space_assignment::HloRandomFilter*>(value);
  if (value != nullptr) {
    _impl_._has_bits_[0] |= 0x00000010u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000010u;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:xla.memory_space_assignment.HloPositionMatcher.hlo_random_filter)
}
inline ::xla::memory_space_assignment::HloRandomFilter* PROTOBUF_NULLABLE HloPositionMatcher::release_hlo_random_filter() {
  ::google::protobuf::internal::TSanWrite(&_impl_);

  _impl_._has_bits_[0] &= ~0x00000010u;
  ::xla::memory_space_assignment::HloRandomFilter* released = _impl_.hlo_random_filter_;
  _impl_.hlo_random_filter_ = nullptr;
  if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) {
    auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released);
    released = ::google::protobuf::internal::DuplicateIfNonNull(released);
    if (GetArena() == nullptr) {
      delete old;
    }
  } else {
    if (GetArena() != nullptr) {
      released = ::google::protobuf::internal::DuplicateIfNonNull(released);
    }
  }
  return released;
}
inline ::xla::memory_space_assignment::HloRandomFilter* PROTOBUF_NULLABLE HloPositionMatcher::unsafe_arena_release_hlo_random_filter() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  // @@protoc_insertion_point(field_release:xla.memory_space_assignment.HloPositionMatcher.hlo_random_filter)

  _impl_._has_bits_[0] &= ~0x00000010u;
  ::xla::memory_space_assignment::HloRandomFilter* temp = _impl_.hlo_random_filter_;
  _impl_.hlo_random_filter_ = nullptr;
  return temp;
}
inline ::xla::memory_space_assignment::HloRandomFilter* PROTOBUF_NONNULL HloPositionMatcher::_internal_mutable_hlo_random_filter() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.hlo_random_filter_ == nullptr) {
    auto* p = ::google::protobuf::Message::DefaultConstruct<::xla::memory_space_assignment::HloRandomFilter>(GetArena());
    _impl_.hlo_random_filter_ = reinterpret_cast<::xla::memory_space_assignment::HloRandomFilter*>(p);
  }
  return _impl_.hlo_random_filter_;
}
inline ::xla::memory_space_assignment::HloRandomFilter* PROTOBUF_NONNULL HloPositionMatcher::mutable_hlo_random_filter()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  _impl_._has_bits_[0] |= 0x00000010u;
  ::xla::memory_space_assignment::HloRandomFilter* _msg = _internal_mutable_hlo_random_filter();
  // @@protoc_insertion_point(field_mutable:xla.memory_space_assignment.HloPositionMatcher.hlo_random_filter)
  return _msg;
}
inline void HloPositionMatcher::set_allocated_hlo_random_filter(::xla::memory_space_assignment::HloRandomFilter* PROTOBUF_NULLABLE value) {
  ::google::protobuf::Arena* message_arena = GetArena();
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (message_arena == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.hlo_random_filter_);
  }

  if (value != nullptr) {
    ::google::protobuf::Arena* submessage_arena = value->GetArena();
    if (message_arena != submessage_arena) {
      value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena);
    }
    _impl_._has_bits_[0] |= 0x00000010u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000010u;
  }

  _impl_.hlo_random_filter_ = reinterpret_cast<::xla::memory_space_assignment::HloRandomFilter*>(value);
  // @@protoc_insertion_point(field_set_allocated:xla.memory_space_assignment.HloPositionMatcher.hlo_random_filter)
}

// -------------------------------------------------------------------

// MsaSortOrderOverrideOptions

// bool assign_first = 1;
inline bool MsaSortOrderOverrideOptions::has_assign_first() const {
  return options_case() == kAssignFirst;
}
inline void MsaSortOrderOverrideOptions::set_has_assign_first() {
  _impl_._oneof_case_[0] = kAssignFirst;
}
inline void MsaSortOrderOverrideOptions::clear_assign_first() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (options_case() == kAssignFirst) {
    _impl_.options_.assign_first_ = false;
    clear_has_options();
  }
}
inline bool MsaSortOrderOverrideOptions::assign_first() const {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.MsaSortOrderOverrideOptions.assign_first)
  return _internal_assign_first();
}
inline void MsaSortOrderOverrideOptions::set_assign_first(bool value) {
  if (options_case() != kAssignFirst) {
    clear_options();
    set_has_assign_first();
  }
  _impl_.options_.assign_first_ = value;
  // @@protoc_insertion_point(field_set:xla.memory_space_assignment.MsaSortOrderOverrideOptions.assign_first)
}
inline bool MsaSortOrderOverrideOptions::_internal_assign_first() const {
  if (options_case() == kAssignFirst) {
    return _impl_.options_.assign_first_;
  }
  return false;
}

// bool assign_last = 2;
inline bool MsaSortOrderOverrideOptions::has_assign_last() const {
  return options_case() == kAssignLast;
}
inline void MsaSortOrderOverrideOptions::set_has_assign_last() {
  _impl_._oneof_case_[0] = kAssignLast;
}
inline void MsaSortOrderOverrideOptions::clear_assign_last() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (options_case() == kAssignLast) {
    _impl_.options_.assign_last_ = false;
    clear_has_options();
  }
}
inline bool MsaSortOrderOverrideOptions::assign_last() const {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.MsaSortOrderOverrideOptions.assign_last)
  return _internal_assign_last();
}
inline void MsaSortOrderOverrideOptions::set_assign_last(bool value) {
  if (options_case() != kAssignLast) {
    clear_options();
    set_has_assign_last();
  }
  _impl_.options_.assign_last_ = value;
  // @@protoc_insertion_point(field_set:xla.memory_space_assignment.MsaSortOrderOverrideOptions.assign_last)
}
inline bool MsaSortOrderOverrideOptions::_internal_assign_last() const {
  if (options_case() == kAssignLast) {
    return _impl_.options_.assign_last_;
  }
  return false;
}

// int64 assign_value = 3;
inline bool MsaSortOrderOverrideOptions::has_assign_value() const {
  return options_case() == kAssignValue;
}
inline void MsaSortOrderOverrideOptions::set_has_assign_value() {
  _impl_._oneof_case_[0] = kAssignValue;
}
inline void MsaSortOrderOverrideOptions::clear_assign_value() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (options_case() == kAssignValue) {
    _impl_.options_.assign_value_ = ::int64_t{0};
    clear_has_options();
  }
}
inline ::int64_t MsaSortOrderOverrideOptions::assign_value() const {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.MsaSortOrderOverrideOptions.assign_value)
  return _internal_assign_value();
}
inline void MsaSortOrderOverrideOptions::set_assign_value(::int64_t value) {
  if (options_case() != kAssignValue) {
    clear_options();
    set_has_assign_value();
  }
  _impl_.options_.assign_value_ = value;
  // @@protoc_insertion_point(field_set:xla.memory_space_assignment.MsaSortOrderOverrideOptions.assign_value)
}
inline ::int64_t MsaSortOrderOverrideOptions::_internal_assign_value() const {
  if (options_case() == kAssignValue) {
    return _impl_.options_.assign_value_;
  }
  return ::int64_t{0};
}

inline bool MsaSortOrderOverrideOptions::has_options() const {
  return options_case() != OPTIONS_NOT_SET;
}
inline void MsaSortOrderOverrideOptions::clear_has_options() {
  _impl_._oneof_case_[0] = OPTIONS_NOT_SET;
}
inline MsaSortOrderOverrideOptions::OptionsCase MsaSortOrderOverrideOptions::options_case() const {
  return MsaSortOrderOverrideOptions::OptionsCase(_impl_._oneof_case_[0]);
}
// -------------------------------------------------------------------

// MsaSortOrderOverride

// optional .xla.memory_space_assignment.HloPositionMatcher hlo_position_matcher = 1;
inline bool MsaSortOrderOverride::has_hlo_position_matcher() const {
  bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
  PROTOBUF_ASSUME(!value || _impl_.hlo_position_matcher_ != nullptr);
  return value;
}
inline void MsaSortOrderOverride::clear_hlo_position_matcher() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.hlo_position_matcher_ != nullptr) _impl_.hlo_position_matcher_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
inline const ::xla::memory_space_assignment::HloPositionMatcher& MsaSortOrderOverride::_internal_hlo_position_matcher() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  const ::xla::memory_space_assignment::HloPositionMatcher* p = _impl_.hlo_position_matcher_;
  return p != nullptr ? *p : reinterpret_cast<const ::xla::memory_space_assignment::HloPositionMatcher&>(::xla::memory_space_assignment::_HloPositionMatcher_default_instance_);
}
inline const ::xla::memory_space_assignment::HloPositionMatcher& MsaSortOrderOverride::hlo_position_matcher() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.MsaSortOrderOverride.hlo_position_matcher)
  return _internal_hlo_position_matcher();
}
inline void MsaSortOrderOverride::unsafe_arena_set_allocated_hlo_position_matcher(
    ::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NULLABLE value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (GetArena() == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.hlo_position_matcher_);
  }
  _impl_.hlo_position_matcher_ = reinterpret_cast<::xla::memory_space_assignment::HloPositionMatcher*>(value);
  if (value != nullptr) {
    _impl_._has_bits_[0] |= 0x00000001u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000001u;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:xla.memory_space_assignment.MsaSortOrderOverride.hlo_position_matcher)
}
inline ::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NULLABLE MsaSortOrderOverride::release_hlo_position_matcher() {
  ::google::protobuf::internal::TSanWrite(&_impl_);

  _impl_._has_bits_[0] &= ~0x00000001u;
  ::xla::memory_space_assignment::HloPositionMatcher* released = _impl_.hlo_position_matcher_;
  _impl_.hlo_position_matcher_ = nullptr;
  if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) {
    auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released);
    released = ::google::protobuf::internal::DuplicateIfNonNull(released);
    if (GetArena() == nullptr) {
      delete old;
    }
  } else {
    if (GetArena() != nullptr) {
      released = ::google::protobuf::internal::DuplicateIfNonNull(released);
    }
  }
  return released;
}
inline ::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NULLABLE MsaSortOrderOverride::unsafe_arena_release_hlo_position_matcher() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  // @@protoc_insertion_point(field_release:xla.memory_space_assignment.MsaSortOrderOverride.hlo_position_matcher)

  _impl_._has_bits_[0] &= ~0x00000001u;
  ::xla::memory_space_assignment::HloPositionMatcher* temp = _impl_.hlo_position_matcher_;
  _impl_.hlo_position_matcher_ = nullptr;
  return temp;
}
inline ::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NONNULL MsaSortOrderOverride::_internal_mutable_hlo_position_matcher() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.hlo_position_matcher_ == nullptr) {
    auto* p = ::google::protobuf::Message::DefaultConstruct<::xla::memory_space_assignment::HloPositionMatcher>(GetArena());
    _impl_.hlo_position_matcher_ = reinterpret_cast<::xla::memory_space_assignment::HloPositionMatcher*>(p);
  }
  return _impl_.hlo_position_matcher_;
}
inline ::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NONNULL MsaSortOrderOverride::mutable_hlo_position_matcher()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  _impl_._has_bits_[0] |= 0x00000001u;
  ::xla::memory_space_assignment::HloPositionMatcher* _msg = _internal_mutable_hlo_position_matcher();
  // @@protoc_insertion_point(field_mutable:xla.memory_space_assignment.MsaSortOrderOverride.hlo_position_matcher)
  return _msg;
}
inline void MsaSortOrderOverride::set_allocated_hlo_position_matcher(::xla::memory_space_assignment::HloPositionMatcher* PROTOBUF_NULLABLE value) {
  ::google::protobuf::Arena* message_arena = GetArena();
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (message_arena == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.hlo_position_matcher_);
  }

  if (value != nullptr) {
    ::google::protobuf::Arena* submessage_arena = value->GetArena();
    if (message_arena != submessage_arena) {
      value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena);
    }
    _impl_._has_bits_[0] |= 0x00000001u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000001u;
  }

  _impl_.hlo_position_matcher_ = reinterpret_cast<::xla::memory_space_assignment::HloPositionMatcher*>(value);
  // @@protoc_insertion_point(field_set_allocated:xla.memory_space_assignment.MsaSortOrderOverride.hlo_position_matcher)
}

// optional .xla.memory_space_assignment.MsaSortOrderOverrideOptions override_options = 2;
inline bool MsaSortOrderOverride::has_override_options() const {
  bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
  PROTOBUF_ASSUME(!value || _impl_.override_options_ != nullptr);
  return value;
}
inline void MsaSortOrderOverride::clear_override_options() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.override_options_ != nullptr) _impl_.override_options_->Clear();
  _impl_._has_bits_[0] &= ~0x00000002u;
}
inline const ::xla::memory_space_assignment::MsaSortOrderOverrideOptions& MsaSortOrderOverride::_internal_override_options() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  const ::xla::memory_space_assignment::MsaSortOrderOverrideOptions* p = _impl_.override_options_;
  return p != nullptr ? *p : reinterpret_cast<const ::xla::memory_space_assignment::MsaSortOrderOverrideOptions&>(::xla::memory_space_assignment::_MsaSortOrderOverrideOptions_default_instance_);
}
inline const ::xla::memory_space_assignment::MsaSortOrderOverrideOptions& MsaSortOrderOverride::override_options() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.MsaSortOrderOverride.override_options)
  return _internal_override_options();
}
inline void MsaSortOrderOverride::unsafe_arena_set_allocated_override_options(
    ::xla::memory_space_assignment::MsaSortOrderOverrideOptions* PROTOBUF_NULLABLE value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (GetArena() == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.override_options_);
  }
  _impl_.override_options_ = reinterpret_cast<::xla::memory_space_assignment::MsaSortOrderOverrideOptions*>(value);
  if (value != nullptr) {
    _impl_._has_bits_[0] |= 0x00000002u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000002u;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:xla.memory_space_assignment.MsaSortOrderOverride.override_options)
}
inline ::xla::memory_space_assignment::MsaSortOrderOverrideOptions* PROTOBUF_NULLABLE MsaSortOrderOverride::release_override_options() {
  ::google::protobuf::internal::TSanWrite(&_impl_);

  _impl_._has_bits_[0] &= ~0x00000002u;
  ::xla::memory_space_assignment::MsaSortOrderOverrideOptions* released = _impl_.override_options_;
  _impl_.override_options_ = nullptr;
  if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) {
    auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released);
    released = ::google::protobuf::internal::DuplicateIfNonNull(released);
    if (GetArena() == nullptr) {
      delete old;
    }
  } else {
    if (GetArena() != nullptr) {
      released = ::google::protobuf::internal::DuplicateIfNonNull(released);
    }
  }
  return released;
}
inline ::xla::memory_space_assignment::MsaSortOrderOverrideOptions* PROTOBUF_NULLABLE MsaSortOrderOverride::unsafe_arena_release_override_options() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  // @@protoc_insertion_point(field_release:xla.memory_space_assignment.MsaSortOrderOverride.override_options)

  _impl_._has_bits_[0] &= ~0x00000002u;
  ::xla::memory_space_assignment::MsaSortOrderOverrideOptions* temp = _impl_.override_options_;
  _impl_.override_options_ = nullptr;
  return temp;
}
inline ::xla::memory_space_assignment::MsaSortOrderOverrideOptions* PROTOBUF_NONNULL MsaSortOrderOverride::_internal_mutable_override_options() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.override_options_ == nullptr) {
    auto* p = ::google::protobuf::Message::DefaultConstruct<::xla::memory_space_assignment::MsaSortOrderOverrideOptions>(GetArena());
    _impl_.override_options_ = reinterpret_cast<::xla::memory_space_assignment::MsaSortOrderOverrideOptions*>(p);
  }
  return _impl_.override_options_;
}
inline ::xla::memory_space_assignment::MsaSortOrderOverrideOptions* PROTOBUF_NONNULL MsaSortOrderOverride::mutable_override_options()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  _impl_._has_bits_[0] |= 0x00000002u;
  ::xla::memory_space_assignment::MsaSortOrderOverrideOptions* _msg = _internal_mutable_override_options();
  // @@protoc_insertion_point(field_mutable:xla.memory_space_assignment.MsaSortOrderOverride.override_options)
  return _msg;
}
inline void MsaSortOrderOverride::set_allocated_override_options(::xla::memory_space_assignment::MsaSortOrderOverrideOptions* PROTOBUF_NULLABLE value) {
  ::google::protobuf::Arena* message_arena = GetArena();
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (message_arena == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.override_options_);
  }

  if (value != nullptr) {
    ::google::protobuf::Arena* submessage_arena = value->GetArena();
    if (message_arena != submessage_arena) {
      value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena);
    }
    _impl_._has_bits_[0] |= 0x00000002u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000002u;
  }

  _impl_.override_options_ = reinterpret_cast<::xla::memory_space_assignment::MsaSortOrderOverrideOptions*>(value);
  // @@protoc_insertion_point(field_set_allocated:xla.memory_space_assignment.MsaSortOrderOverride.override_options)
}

// optional bool apply_to_cross_program_prefetches = 3;
inline bool MsaSortOrderOverride::has_apply_to_cross_program_prefetches() const {
  bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0;
  return value;
}
inline void MsaSortOrderOverride::clear_apply_to_cross_program_prefetches() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.apply_to_cross_program_prefetches_ = false;
  _impl_._has_bits_[0] &= ~0x00000004u;
}
inline bool MsaSortOrderOverride::apply_to_cross_program_prefetches() const {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.MsaSortOrderOverride.apply_to_cross_program_prefetches)
  return _internal_apply_to_cross_program_prefetches();
}
inline void MsaSortOrderOverride::set_apply_to_cross_program_prefetches(bool value) {
  _internal_set_apply_to_cross_program_prefetches(value);
  _impl_._has_bits_[0] |= 0x00000004u;
  // @@protoc_insertion_point(field_set:xla.memory_space_assignment.MsaSortOrderOverride.apply_to_cross_program_prefetches)
}
inline bool MsaSortOrderOverride::_internal_apply_to_cross_program_prefetches() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  return _impl_.apply_to_cross_program_prefetches_;
}
inline void MsaSortOrderOverride::_internal_set_apply_to_cross_program_prefetches(bool value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.apply_to_cross_program_prefetches_ = value;
}

// -------------------------------------------------------------------

// MsaSortOrderOverrides

// repeated .xla.memory_space_assignment.MsaSortOrderOverride overrides = 1;
inline int MsaSortOrderOverrides::_internal_overrides_size() const {
  return _internal_overrides().size();
}
inline int MsaSortOrderOverrides::overrides_size() const {
  return _internal_overrides_size();
}
inline void MsaSortOrderOverrides::clear_overrides() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.overrides_.Clear();
}
inline ::xla::memory_space_assignment::MsaSortOrderOverride* PROTOBUF_NONNULL MsaSortOrderOverrides::mutable_overrides(int index)
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_mutable:xla.memory_space_assignment.MsaSortOrderOverrides.overrides)
  return _internal_mutable_overrides()->Mutable(index);
}
inline ::google::protobuf::RepeatedPtrField<::xla::memory_space_assignment::MsaSortOrderOverride>* PROTOBUF_NONNULL MsaSortOrderOverrides::mutable_overrides()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_mutable_list:xla.memory_space_assignment.MsaSortOrderOverrides.overrides)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  return _internal_mutable_overrides();
}
inline const ::xla::memory_space_assignment::MsaSortOrderOverride& MsaSortOrderOverrides::overrides(int index) const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:xla.memory_space_assignment.MsaSortOrderOverrides.overrides)
  return _internal_overrides().Get(index);
}
inline ::xla::memory_space_assignment::MsaSortOrderOverride* PROTOBUF_NONNULL MsaSortOrderOverrides::add_overrides()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  ::xla::memory_space_assignment::MsaSortOrderOverride* _add = _internal_mutable_overrides()->Add();
  // @@protoc_insertion_point(field_add:xla.memory_space_assignment.MsaSortOrderOverrides.overrides)
  return _add;
}
inline const ::google::protobuf::RepeatedPtrField<::xla::memory_space_assignment::MsaSortOrderOverride>& MsaSortOrderOverrides::overrides() const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_list:xla.memory_space_assignment.MsaSortOrderOverrides.overrides)
  return _internal_overrides();
}
inline const ::google::protobuf::RepeatedPtrField<::xla::memory_space_assignment::MsaSortOrderOverride>&
MsaSortOrderOverrides::_internal_overrides() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  return _impl_.overrides_;
}
inline ::google::protobuf::RepeatedPtrField<::xla::memory_space_assignment::MsaSortOrderOverride>* PROTOBUF_NONNULL
MsaSortOrderOverrides::_internal_mutable_overrides() {
  ::google::protobuf::internal::TSanRead(&_impl_);
  return &_impl_.overrides_;
}

// -------------------------------------------------------------------

// ExpandedScopedAlternateMemoryMode

#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif  // __GNUC__

// @@protoc_insertion_point(namespace_scope)
}  // namespace memory_space_assignment
}  // namespace xla


namespace google {
namespace protobuf {

template <>
struct is_proto_enum<::xla::memory_space_assignment::ExpandedScopedAlternateMemoryMode_Value> : std::true_type {};
template <>
inline const EnumDescriptor* PROTOBUF_NONNULL GetEnumDescriptor<::xla::memory_space_assignment::ExpandedScopedAlternateMemoryMode_Value>() {
  return ::xla::memory_space_assignment::ExpandedScopedAlternateMemoryMode_Value_descriptor();
}

}  // namespace protobuf
}  // namespace google

// @@protoc_insertion_point(global_scope)

#include "google/protobuf/port_undef.inc"

#endif  // xla_2fservice_2fmemory_5fspace_5fassignment_2fmemory_5fspace_5fassignment_2eproto_2epb_2eh
