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

#ifndef xla_2fservice_2fgpu_2fkernels_2fcustom_5fkernel_2eproto_2epb_2eh
#define xla_2fservice_2fgpu_2fkernels_2fcustom_5fkernel_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_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/unknown_field_set.h"
#include "xla/stream_executor/kernel_spec.pb.h"
#include "xla/stream_executor/launch_dim.pb.h"
// @@protoc_insertion_point(includes)

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

#define PROTOBUF_INTERNAL_EXPORT_xla_2fservice_2fgpu_2fkernels_2fcustom_5fkernel_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_2fgpu_2fkernels_2fcustom_5fkernel_2eproto {
  static const ::uint32_t offsets[];
};
extern "C" {
PROTOBUF_EXPORT extern const ::google::protobuf::internal::DescriptorTable descriptor_table_xla_2fservice_2fgpu_2fkernels_2fcustom_5fkernel_2eproto;
}  // extern "C"
namespace xla {
namespace gpu {
class CustomKernelProto;
struct CustomKernelProtoDefaultTypeInternal;
PROTOBUF_EXPORT extern CustomKernelProtoDefaultTypeInternal _CustomKernelProto_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull CustomKernelProto_class_data_;
}  // namespace gpu
}  // namespace xla
namespace google {
namespace protobuf {
}  // namespace protobuf
}  // namespace google

namespace xla {
namespace gpu {

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


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

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

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

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

  inline CustomKernelProto(const CustomKernelProto& from) : CustomKernelProto(nullptr, from) {}
  inline CustomKernelProto(CustomKernelProto&& from) noexcept
      : CustomKernelProto(nullptr, ::std::move(from)) {}
  inline CustomKernelProto& operator=(const CustomKernelProto& from) {
    CopyFrom(from);
    return *this;
  }
  inline CustomKernelProto& operator=(CustomKernelProto&& 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 CustomKernelProto& default_instance() {
    return *reinterpret_cast<const CustomKernelProto*>(
        &_CustomKernelProto_default_instance_);
  }
  static constexpr int kIndexInFileMessages = 0;
  friend void swap(CustomKernelProto& a, CustomKernelProto& b) { a.Swap(&b); }
  inline void Swap(CustomKernelProto* 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(CustomKernelProto* PROTOBUF_NONNULL other) {
    if (other == this) return;
    ABSL_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

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

  CustomKernelProto* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const {
    return ::google::protobuf::Message::DefaultConstruct<CustomKernelProto>(arena);
  }
  using ::google::protobuf::Message::CopyFrom;
  void CopyFrom(const CustomKernelProto& from);
  using ::google::protobuf::Message::MergeFrom;
  void MergeFrom(const CustomKernelProto& from) { CustomKernelProto::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(CustomKernelProto* PROTOBUF_NONNULL other);
 private:
  template <typename T>
  friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)();
  static ::absl::string_view FullMessageName() { return "xla.gpu.CustomKernelProto"; }

 protected:
  explicit CustomKernelProto(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  CustomKernelProto(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const CustomKernelProto& from);
  CustomKernelProto(
      ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, CustomKernelProto&& from) noexcept
      : CustomKernelProto(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 {
    kNameFieldNumber = 1,
    kKernelSpecFieldNumber = 2,
    kBlockDimsFieldNumber = 3,
    kThreadDimsFieldNumber = 4,
    kClusterDimFieldNumber = 5,
    kSharedMemoryBytesFieldNumber = 6,
  };
  // string name = 1;
  void clear_name() ;
  const ::std::string& name() const;
  template <typename Arg_ = const ::std::string&, typename... Args_>
  void set_name(Arg_&& arg, Args_... args);
  ::std::string* PROTOBUF_NONNULL mutable_name();
  [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_name();
  void set_allocated_name(::std::string* PROTOBUF_NULLABLE value);

  private:
  const ::std::string& _internal_name() const;
  PROTOBUF_ALWAYS_INLINE void _internal_set_name(const ::std::string& value);
  ::std::string* PROTOBUF_NONNULL _internal_mutable_name();

  public:
  // .stream_executor.KernelLoaderSpecProto kernel_spec = 2;
  bool has_kernel_spec() const;
  void clear_kernel_spec() ;
  const ::stream_executor::KernelLoaderSpecProto& kernel_spec() const;
  [[nodiscard]] ::stream_executor::KernelLoaderSpecProto* PROTOBUF_NULLABLE release_kernel_spec();
  ::stream_executor::KernelLoaderSpecProto* PROTOBUF_NONNULL mutable_kernel_spec();
  void set_allocated_kernel_spec(::stream_executor::KernelLoaderSpecProto* PROTOBUF_NULLABLE value);
  void unsafe_arena_set_allocated_kernel_spec(::stream_executor::KernelLoaderSpecProto* PROTOBUF_NULLABLE value);
  ::stream_executor::KernelLoaderSpecProto* PROTOBUF_NULLABLE unsafe_arena_release_kernel_spec();

  private:
  const ::stream_executor::KernelLoaderSpecProto& _internal_kernel_spec() const;
  ::stream_executor::KernelLoaderSpecProto* PROTOBUF_NONNULL _internal_mutable_kernel_spec();

  public:
  // .stream_executor.BlockDimProto block_dims = 3;
  bool has_block_dims() const;
  void clear_block_dims() ;
  const ::stream_executor::BlockDimProto& block_dims() const;
  [[nodiscard]] ::stream_executor::BlockDimProto* PROTOBUF_NULLABLE release_block_dims();
  ::stream_executor::BlockDimProto* PROTOBUF_NONNULL mutable_block_dims();
  void set_allocated_block_dims(::stream_executor::BlockDimProto* PROTOBUF_NULLABLE value);
  void unsafe_arena_set_allocated_block_dims(::stream_executor::BlockDimProto* PROTOBUF_NULLABLE value);
  ::stream_executor::BlockDimProto* PROTOBUF_NULLABLE unsafe_arena_release_block_dims();

  private:
  const ::stream_executor::BlockDimProto& _internal_block_dims() const;
  ::stream_executor::BlockDimProto* PROTOBUF_NONNULL _internal_mutable_block_dims();

  public:
  // .stream_executor.ThreadDimProto thread_dims = 4;
  bool has_thread_dims() const;
  void clear_thread_dims() ;
  const ::stream_executor::ThreadDimProto& thread_dims() const;
  [[nodiscard]] ::stream_executor::ThreadDimProto* PROTOBUF_NULLABLE release_thread_dims();
  ::stream_executor::ThreadDimProto* PROTOBUF_NONNULL mutable_thread_dims();
  void set_allocated_thread_dims(::stream_executor::ThreadDimProto* PROTOBUF_NULLABLE value);
  void unsafe_arena_set_allocated_thread_dims(::stream_executor::ThreadDimProto* PROTOBUF_NULLABLE value);
  ::stream_executor::ThreadDimProto* PROTOBUF_NULLABLE unsafe_arena_release_thread_dims();

  private:
  const ::stream_executor::ThreadDimProto& _internal_thread_dims() const;
  ::stream_executor::ThreadDimProto* PROTOBUF_NONNULL _internal_mutable_thread_dims();

  public:
  // optional .stream_executor.ClusterDimProto cluster_dim = 5;
  bool has_cluster_dim() const;
  void clear_cluster_dim() ;
  const ::stream_executor::ClusterDimProto& cluster_dim() const;
  [[nodiscard]] ::stream_executor::ClusterDimProto* PROTOBUF_NULLABLE release_cluster_dim();
  ::stream_executor::ClusterDimProto* PROTOBUF_NONNULL mutable_cluster_dim();
  void set_allocated_cluster_dim(::stream_executor::ClusterDimProto* PROTOBUF_NULLABLE value);
  void unsafe_arena_set_allocated_cluster_dim(::stream_executor::ClusterDimProto* PROTOBUF_NULLABLE value);
  ::stream_executor::ClusterDimProto* PROTOBUF_NULLABLE unsafe_arena_release_cluster_dim();

  private:
  const ::stream_executor::ClusterDimProto& _internal_cluster_dim() const;
  ::stream_executor::ClusterDimProto* PROTOBUF_NONNULL _internal_mutable_cluster_dim();

  public:
  // int64 shared_memory_bytes = 6;
  void clear_shared_memory_bytes() ;
  ::int64_t shared_memory_bytes() const;
  void set_shared_memory_bytes(::int64_t value);

  private:
  ::int64_t _internal_shared_memory_bytes() const;
  void _internal_set_shared_memory_bytes(::int64_t value);

  public:
  // @@protoc_insertion_point(class_scope:xla.gpu.CustomKernelProto)
 private:
  class _Internal;
  friend class ::google::protobuf::internal::TcParser;
  static const ::google::protobuf::internal::TcParseTable<3, 6,
                                   4, 38,
                                   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 CustomKernelProto& from_msg);
    ::google::protobuf::internal::HasBits<1> _has_bits_;
    ::google::protobuf::internal::CachedSize _cached_size_;
    ::google::protobuf::internal::ArenaStringPtr name_;
    ::stream_executor::KernelLoaderSpecProto* PROTOBUF_NULLABLE kernel_spec_;
    ::stream_executor::BlockDimProto* PROTOBUF_NULLABLE block_dims_;
    ::stream_executor::ThreadDimProto* PROTOBUF_NULLABLE thread_dims_;
    ::stream_executor::ClusterDimProto* PROTOBUF_NULLABLE cluster_dim_;
    ::int64_t shared_memory_bytes_;
    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_xla_2fservice_2fgpu_2fkernels_2fcustom_5fkernel_2eproto;
};

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

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




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


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

// CustomKernelProto

// string name = 1;
inline void CustomKernelProto::clear_name() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.name_.ClearToEmpty();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
inline const ::std::string& CustomKernelProto::name() const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:xla.gpu.CustomKernelProto.name)
  return _internal_name();
}
template <typename Arg_, typename... Args_>
PROTOBUF_ALWAYS_INLINE void CustomKernelProto::set_name(Arg_&& arg, Args_... args) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_._has_bits_[0] |= 0x00000001u;
  _impl_.name_.Set(static_cast<Arg_&&>(arg), args..., GetArena());
  // @@protoc_insertion_point(field_set:xla.gpu.CustomKernelProto.name)
}
inline ::std::string* PROTOBUF_NONNULL CustomKernelProto::mutable_name()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::std::string* _s = _internal_mutable_name();
  // @@protoc_insertion_point(field_mutable:xla.gpu.CustomKernelProto.name)
  return _s;
}
inline const ::std::string& CustomKernelProto::_internal_name() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  return _impl_.name_.Get();
}
inline void CustomKernelProto::_internal_set_name(const ::std::string& value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_._has_bits_[0] |= 0x00000001u;
  _impl_.name_.Set(value, GetArena());
}
inline ::std::string* PROTOBUF_NONNULL CustomKernelProto::_internal_mutable_name() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_._has_bits_[0] |= 0x00000001u;
  return _impl_.name_.Mutable( GetArena());
}
inline ::std::string* PROTOBUF_NULLABLE CustomKernelProto::release_name() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  // @@protoc_insertion_point(field_release:xla.gpu.CustomKernelProto.name)
  if ((_impl_._has_bits_[0] & 0x00000001u) == 0) {
    return nullptr;
  }
  _impl_._has_bits_[0] &= ~0x00000001u;
  auto* released = _impl_.name_.Release();
  if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) {
    _impl_.name_.Set("", GetArena());
  }
  return released;
}
inline void CustomKernelProto::set_allocated_name(::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_.name_.SetAllocated(value, GetArena());
  if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.name_.IsDefault()) {
    _impl_.name_.Set("", GetArena());
  }
  // @@protoc_insertion_point(field_set_allocated:xla.gpu.CustomKernelProto.name)
}

// .stream_executor.KernelLoaderSpecProto kernel_spec = 2;
inline bool CustomKernelProto::has_kernel_spec() const {
  bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
  PROTOBUF_ASSUME(!value || _impl_.kernel_spec_ != nullptr);
  return value;
}
inline const ::stream_executor::KernelLoaderSpecProto& CustomKernelProto::_internal_kernel_spec() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  const ::stream_executor::KernelLoaderSpecProto* p = _impl_.kernel_spec_;
  return p != nullptr ? *p : reinterpret_cast<const ::stream_executor::KernelLoaderSpecProto&>(::stream_executor::_KernelLoaderSpecProto_default_instance_);
}
inline const ::stream_executor::KernelLoaderSpecProto& CustomKernelProto::kernel_spec() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:xla.gpu.CustomKernelProto.kernel_spec)
  return _internal_kernel_spec();
}
inline void CustomKernelProto::unsafe_arena_set_allocated_kernel_spec(
    ::stream_executor::KernelLoaderSpecProto* PROTOBUF_NULLABLE value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (GetArena() == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.kernel_spec_);
  }
  _impl_.kernel_spec_ = reinterpret_cast<::stream_executor::KernelLoaderSpecProto*>(value);
  if (value != nullptr) {
    _impl_._has_bits_[0] |= 0x00000002u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000002u;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:xla.gpu.CustomKernelProto.kernel_spec)
}
inline ::stream_executor::KernelLoaderSpecProto* PROTOBUF_NULLABLE CustomKernelProto::release_kernel_spec() {
  ::google::protobuf::internal::TSanWrite(&_impl_);

  _impl_._has_bits_[0] &= ~0x00000002u;
  ::stream_executor::KernelLoaderSpecProto* released = _impl_.kernel_spec_;
  _impl_.kernel_spec_ = 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 ::stream_executor::KernelLoaderSpecProto* PROTOBUF_NULLABLE CustomKernelProto::unsafe_arena_release_kernel_spec() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  // @@protoc_insertion_point(field_release:xla.gpu.CustomKernelProto.kernel_spec)

  _impl_._has_bits_[0] &= ~0x00000002u;
  ::stream_executor::KernelLoaderSpecProto* temp = _impl_.kernel_spec_;
  _impl_.kernel_spec_ = nullptr;
  return temp;
}
inline ::stream_executor::KernelLoaderSpecProto* PROTOBUF_NONNULL CustomKernelProto::_internal_mutable_kernel_spec() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.kernel_spec_ == nullptr) {
    auto* p = ::google::protobuf::Message::DefaultConstruct<::stream_executor::KernelLoaderSpecProto>(GetArena());
    _impl_.kernel_spec_ = reinterpret_cast<::stream_executor::KernelLoaderSpecProto*>(p);
  }
  return _impl_.kernel_spec_;
}
inline ::stream_executor::KernelLoaderSpecProto* PROTOBUF_NONNULL CustomKernelProto::mutable_kernel_spec()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  _impl_._has_bits_[0] |= 0x00000002u;
  ::stream_executor::KernelLoaderSpecProto* _msg = _internal_mutable_kernel_spec();
  // @@protoc_insertion_point(field_mutable:xla.gpu.CustomKernelProto.kernel_spec)
  return _msg;
}
inline void CustomKernelProto::set_allocated_kernel_spec(::stream_executor::KernelLoaderSpecProto* 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_.kernel_spec_);
  }

  if (value != nullptr) {
    ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::Message*>(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_.kernel_spec_ = reinterpret_cast<::stream_executor::KernelLoaderSpecProto*>(value);
  // @@protoc_insertion_point(field_set_allocated:xla.gpu.CustomKernelProto.kernel_spec)
}

// .stream_executor.BlockDimProto block_dims = 3;
inline bool CustomKernelProto::has_block_dims() const {
  bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0;
  PROTOBUF_ASSUME(!value || _impl_.block_dims_ != nullptr);
  return value;
}
inline const ::stream_executor::BlockDimProto& CustomKernelProto::_internal_block_dims() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  const ::stream_executor::BlockDimProto* p = _impl_.block_dims_;
  return p != nullptr ? *p : reinterpret_cast<const ::stream_executor::BlockDimProto&>(::stream_executor::_BlockDimProto_default_instance_);
}
inline const ::stream_executor::BlockDimProto& CustomKernelProto::block_dims() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:xla.gpu.CustomKernelProto.block_dims)
  return _internal_block_dims();
}
inline void CustomKernelProto::unsafe_arena_set_allocated_block_dims(
    ::stream_executor::BlockDimProto* PROTOBUF_NULLABLE value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (GetArena() == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.block_dims_);
  }
  _impl_.block_dims_ = reinterpret_cast<::stream_executor::BlockDimProto*>(value);
  if (value != nullptr) {
    _impl_._has_bits_[0] |= 0x00000004u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000004u;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:xla.gpu.CustomKernelProto.block_dims)
}
inline ::stream_executor::BlockDimProto* PROTOBUF_NULLABLE CustomKernelProto::release_block_dims() {
  ::google::protobuf::internal::TSanWrite(&_impl_);

  _impl_._has_bits_[0] &= ~0x00000004u;
  ::stream_executor::BlockDimProto* released = _impl_.block_dims_;
  _impl_.block_dims_ = 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 ::stream_executor::BlockDimProto* PROTOBUF_NULLABLE CustomKernelProto::unsafe_arena_release_block_dims() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  // @@protoc_insertion_point(field_release:xla.gpu.CustomKernelProto.block_dims)

  _impl_._has_bits_[0] &= ~0x00000004u;
  ::stream_executor::BlockDimProto* temp = _impl_.block_dims_;
  _impl_.block_dims_ = nullptr;
  return temp;
}
inline ::stream_executor::BlockDimProto* PROTOBUF_NONNULL CustomKernelProto::_internal_mutable_block_dims() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.block_dims_ == nullptr) {
    auto* p = ::google::protobuf::Message::DefaultConstruct<::stream_executor::BlockDimProto>(GetArena());
    _impl_.block_dims_ = reinterpret_cast<::stream_executor::BlockDimProto*>(p);
  }
  return _impl_.block_dims_;
}
inline ::stream_executor::BlockDimProto* PROTOBUF_NONNULL CustomKernelProto::mutable_block_dims()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  _impl_._has_bits_[0] |= 0x00000004u;
  ::stream_executor::BlockDimProto* _msg = _internal_mutable_block_dims();
  // @@protoc_insertion_point(field_mutable:xla.gpu.CustomKernelProto.block_dims)
  return _msg;
}
inline void CustomKernelProto::set_allocated_block_dims(::stream_executor::BlockDimProto* 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_.block_dims_);
  }

  if (value != nullptr) {
    ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::Message*>(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_.block_dims_ = reinterpret_cast<::stream_executor::BlockDimProto*>(value);
  // @@protoc_insertion_point(field_set_allocated:xla.gpu.CustomKernelProto.block_dims)
}

// .stream_executor.ThreadDimProto thread_dims = 4;
inline bool CustomKernelProto::has_thread_dims() const {
  bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0;
  PROTOBUF_ASSUME(!value || _impl_.thread_dims_ != nullptr);
  return value;
}
inline const ::stream_executor::ThreadDimProto& CustomKernelProto::_internal_thread_dims() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  const ::stream_executor::ThreadDimProto* p = _impl_.thread_dims_;
  return p != nullptr ? *p : reinterpret_cast<const ::stream_executor::ThreadDimProto&>(::stream_executor::_ThreadDimProto_default_instance_);
}
inline const ::stream_executor::ThreadDimProto& CustomKernelProto::thread_dims() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:xla.gpu.CustomKernelProto.thread_dims)
  return _internal_thread_dims();
}
inline void CustomKernelProto::unsafe_arena_set_allocated_thread_dims(
    ::stream_executor::ThreadDimProto* PROTOBUF_NULLABLE value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (GetArena() == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.thread_dims_);
  }
  _impl_.thread_dims_ = reinterpret_cast<::stream_executor::ThreadDimProto*>(value);
  if (value != nullptr) {
    _impl_._has_bits_[0] |= 0x00000008u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000008u;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:xla.gpu.CustomKernelProto.thread_dims)
}
inline ::stream_executor::ThreadDimProto* PROTOBUF_NULLABLE CustomKernelProto::release_thread_dims() {
  ::google::protobuf::internal::TSanWrite(&_impl_);

  _impl_._has_bits_[0] &= ~0x00000008u;
  ::stream_executor::ThreadDimProto* released = _impl_.thread_dims_;
  _impl_.thread_dims_ = 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 ::stream_executor::ThreadDimProto* PROTOBUF_NULLABLE CustomKernelProto::unsafe_arena_release_thread_dims() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  // @@protoc_insertion_point(field_release:xla.gpu.CustomKernelProto.thread_dims)

  _impl_._has_bits_[0] &= ~0x00000008u;
  ::stream_executor::ThreadDimProto* temp = _impl_.thread_dims_;
  _impl_.thread_dims_ = nullptr;
  return temp;
}
inline ::stream_executor::ThreadDimProto* PROTOBUF_NONNULL CustomKernelProto::_internal_mutable_thread_dims() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.thread_dims_ == nullptr) {
    auto* p = ::google::protobuf::Message::DefaultConstruct<::stream_executor::ThreadDimProto>(GetArena());
    _impl_.thread_dims_ = reinterpret_cast<::stream_executor::ThreadDimProto*>(p);
  }
  return _impl_.thread_dims_;
}
inline ::stream_executor::ThreadDimProto* PROTOBUF_NONNULL CustomKernelProto::mutable_thread_dims()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  _impl_._has_bits_[0] |= 0x00000008u;
  ::stream_executor::ThreadDimProto* _msg = _internal_mutable_thread_dims();
  // @@protoc_insertion_point(field_mutable:xla.gpu.CustomKernelProto.thread_dims)
  return _msg;
}
inline void CustomKernelProto::set_allocated_thread_dims(::stream_executor::ThreadDimProto* 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_.thread_dims_);
  }

  if (value != nullptr) {
    ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::Message*>(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_.thread_dims_ = reinterpret_cast<::stream_executor::ThreadDimProto*>(value);
  // @@protoc_insertion_point(field_set_allocated:xla.gpu.CustomKernelProto.thread_dims)
}

// optional .stream_executor.ClusterDimProto cluster_dim = 5;
inline bool CustomKernelProto::has_cluster_dim() const {
  bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0;
  PROTOBUF_ASSUME(!value || _impl_.cluster_dim_ != nullptr);
  return value;
}
inline const ::stream_executor::ClusterDimProto& CustomKernelProto::_internal_cluster_dim() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  const ::stream_executor::ClusterDimProto* p = _impl_.cluster_dim_;
  return p != nullptr ? *p : reinterpret_cast<const ::stream_executor::ClusterDimProto&>(::stream_executor::_ClusterDimProto_default_instance_);
}
inline const ::stream_executor::ClusterDimProto& CustomKernelProto::cluster_dim() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:xla.gpu.CustomKernelProto.cluster_dim)
  return _internal_cluster_dim();
}
inline void CustomKernelProto::unsafe_arena_set_allocated_cluster_dim(
    ::stream_executor::ClusterDimProto* PROTOBUF_NULLABLE value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (GetArena() == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.cluster_dim_);
  }
  _impl_.cluster_dim_ = reinterpret_cast<::stream_executor::ClusterDimProto*>(value);
  if (value != nullptr) {
    _impl_._has_bits_[0] |= 0x00000010u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000010u;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:xla.gpu.CustomKernelProto.cluster_dim)
}
inline ::stream_executor::ClusterDimProto* PROTOBUF_NULLABLE CustomKernelProto::release_cluster_dim() {
  ::google::protobuf::internal::TSanWrite(&_impl_);

  _impl_._has_bits_[0] &= ~0x00000010u;
  ::stream_executor::ClusterDimProto* released = _impl_.cluster_dim_;
  _impl_.cluster_dim_ = 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 ::stream_executor::ClusterDimProto* PROTOBUF_NULLABLE CustomKernelProto::unsafe_arena_release_cluster_dim() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  // @@protoc_insertion_point(field_release:xla.gpu.CustomKernelProto.cluster_dim)

  _impl_._has_bits_[0] &= ~0x00000010u;
  ::stream_executor::ClusterDimProto* temp = _impl_.cluster_dim_;
  _impl_.cluster_dim_ = nullptr;
  return temp;
}
inline ::stream_executor::ClusterDimProto* PROTOBUF_NONNULL CustomKernelProto::_internal_mutable_cluster_dim() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.cluster_dim_ == nullptr) {
    auto* p = ::google::protobuf::Message::DefaultConstruct<::stream_executor::ClusterDimProto>(GetArena());
    _impl_.cluster_dim_ = reinterpret_cast<::stream_executor::ClusterDimProto*>(p);
  }
  return _impl_.cluster_dim_;
}
inline ::stream_executor::ClusterDimProto* PROTOBUF_NONNULL CustomKernelProto::mutable_cluster_dim()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  _impl_._has_bits_[0] |= 0x00000010u;
  ::stream_executor::ClusterDimProto* _msg = _internal_mutable_cluster_dim();
  // @@protoc_insertion_point(field_mutable:xla.gpu.CustomKernelProto.cluster_dim)
  return _msg;
}
inline void CustomKernelProto::set_allocated_cluster_dim(::stream_executor::ClusterDimProto* 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_.cluster_dim_);
  }

  if (value != nullptr) {
    ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::Message*>(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_.cluster_dim_ = reinterpret_cast<::stream_executor::ClusterDimProto*>(value);
  // @@protoc_insertion_point(field_set_allocated:xla.gpu.CustomKernelProto.cluster_dim)
}

// int64 shared_memory_bytes = 6;
inline void CustomKernelProto::clear_shared_memory_bytes() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.shared_memory_bytes_ = ::int64_t{0};
  _impl_._has_bits_[0] &= ~0x00000020u;
}
inline ::int64_t CustomKernelProto::shared_memory_bytes() const {
  // @@protoc_insertion_point(field_get:xla.gpu.CustomKernelProto.shared_memory_bytes)
  return _internal_shared_memory_bytes();
}
inline void CustomKernelProto::set_shared_memory_bytes(::int64_t value) {
  _internal_set_shared_memory_bytes(value);
  _impl_._has_bits_[0] |= 0x00000020u;
  // @@protoc_insertion_point(field_set:xla.gpu.CustomKernelProto.shared_memory_bytes)
}
inline ::int64_t CustomKernelProto::_internal_shared_memory_bytes() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  return _impl_.shared_memory_bytes_;
}
inline void CustomKernelProto::_internal_set_shared_memory_bytes(::int64_t value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.shared_memory_bytes_ = value;
}

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

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


// @@protoc_insertion_point(global_scope)

#include "google/protobuf/port_undef.inc"

#endif  // xla_2fservice_2fgpu_2fkernels_2fcustom_5fkernel_2eproto_2epb_2eh
