// automatically generated by the FlatBuffers compiler, do not modify


#ifndef FLATBUFFERS_GENERATED_SDPABACKWARDATTRIBUTES_HIPDNN_FLATBUFFERS_SDK_DATA_OBJECTS_H_
#define FLATBUFFERS_GENERATED_SDPABACKWARDATTRIBUTES_HIPDNN_FLATBUFFERS_SDK_DATA_OBJECTS_H_

#include "flatbuffers/flatbuffers.h"

// Ensure the included flatbuffers.h is the same version as when this file was
// generated, otherwise it may not be compatible.
static_assert(FLATBUFFERS_VERSION_MAJOR == 25 &&
              FLATBUFFERS_VERSION_MINOR == 9 &&
              FLATBUFFERS_VERSION_REVISION == 23,
             "Non-compatible flatbuffers version included");

#include "sdpa_attributes_generated.h"

namespace hipdnn_flatbuffers_sdk {
namespace data_objects {

struct SdpaBackwardAttributes;
struct SdpaBackwardAttributesBuilder;
struct SdpaBackwardAttributesT;

bool operator==(const SdpaBackwardAttributesT &lhs, const SdpaBackwardAttributesT &rhs);
bool operator!=(const SdpaBackwardAttributesT &lhs, const SdpaBackwardAttributesT &rhs);

struct SdpaBackwardAttributesT : public ::flatbuffers::NativeTable {
  typedef SdpaBackwardAttributes TableType;
  int64_t q_tensor_uid = 0;
  int64_t k_tensor_uid = 0;
  int64_t v_tensor_uid = 0;
  int64_t o_tensor_uid = 0;
  int64_t do_tensor_uid = 0;
  int64_t stats_tensor_uid = 0;
  int64_t dq_tensor_uid = 0;
  int64_t dk_tensor_uid = 0;
  int64_t dv_tensor_uid = 0;
  ::flatbuffers::Optional<int64_t> scale_tensor_uid = ::flatbuffers::nullopt;
  ::flatbuffers::Optional<int64_t> attn_mask_tensor_uid = ::flatbuffers::nullopt;
  ::flatbuffers::Optional<int64_t> seq_len_q_tensor_uid = ::flatbuffers::nullopt;
  ::flatbuffers::Optional<int64_t> seq_len_kv_tensor_uid = ::flatbuffers::nullopt;
  ::flatbuffers::Optional<int64_t> seed_tensor_uid = ::flatbuffers::nullopt;
  ::flatbuffers::Optional<int64_t> offset_tensor_uid = ::flatbuffers::nullopt;
  ::flatbuffers::Optional<int64_t> dropout_mask_tensor_uid = ::flatbuffers::nullopt;
  ::flatbuffers::Optional<int64_t> dropout_scale_tensor_uid = ::flatbuffers::nullopt;
  ::flatbuffers::Optional<int64_t> dropout_scale_inv_tensor_uid = ::flatbuffers::nullopt;
  ::flatbuffers::Optional<int64_t> dbias_tensor_uid = ::flatbuffers::nullopt;
  bool alibi_mask = false;
  bool padding_mask = false;
  bool causal_mask = false;
  bool causal_mask_bottom_right = false;
  ::flatbuffers::Optional<float> dropout_probability = ::flatbuffers::nullopt;
  ::flatbuffers::Optional<float> attn_scale_value = ::flatbuffers::nullopt;
  ::flatbuffers::Optional<int64_t> left_bound = ::flatbuffers::nullopt;
  ::flatbuffers::Optional<int64_t> right_bound = ::flatbuffers::nullopt;
  hipdnn_flatbuffers_sdk::data_objects::DiagonalAlignment diagonal_alignment = hipdnn_flatbuffers_sdk::data_objects::DiagonalAlignment::TOP_LEFT;
};

struct SdpaBackwardAttributes FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
  typedef SdpaBackwardAttributesT NativeTableType;
  typedef SdpaBackwardAttributesBuilder Builder;
  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
    VT_Q_TENSOR_UID = 4,
    VT_K_TENSOR_UID = 6,
    VT_V_TENSOR_UID = 8,
    VT_O_TENSOR_UID = 10,
    VT_DO_TENSOR_UID = 12,
    VT_STATS_TENSOR_UID = 14,
    VT_DQ_TENSOR_UID = 16,
    VT_DK_TENSOR_UID = 18,
    VT_DV_TENSOR_UID = 20,
    VT_SCALE_TENSOR_UID = 22,
    VT_ATTN_MASK_TENSOR_UID = 24,
    VT_SEQ_LEN_Q_TENSOR_UID = 26,
    VT_SEQ_LEN_KV_TENSOR_UID = 28,
    VT_SEED_TENSOR_UID = 30,
    VT_OFFSET_TENSOR_UID = 32,
    VT_DROPOUT_MASK_TENSOR_UID = 34,
    VT_DROPOUT_SCALE_TENSOR_UID = 36,
    VT_DROPOUT_SCALE_INV_TENSOR_UID = 38,
    VT_DBIAS_TENSOR_UID = 40,
    VT_ALIBI_MASK = 42,
    VT_PADDING_MASK = 44,
    VT_CAUSAL_MASK = 46,
    VT_CAUSAL_MASK_BOTTOM_RIGHT = 48,
    VT_DROPOUT_PROBABILITY = 50,
    VT_ATTN_SCALE_VALUE = 52,
    VT_LEFT_BOUND = 54,
    VT_RIGHT_BOUND = 56,
    VT_DIAGONAL_ALIGNMENT = 58
  };
  int64_t q_tensor_uid() const {
    return GetField<int64_t>(VT_Q_TENSOR_UID, 0);
  }
  bool mutate_q_tensor_uid(int64_t _q_tensor_uid = 0) {
    return SetField<int64_t>(VT_Q_TENSOR_UID, _q_tensor_uid, 0);
  }
  int64_t k_tensor_uid() const {
    return GetField<int64_t>(VT_K_TENSOR_UID, 0);
  }
  bool mutate_k_tensor_uid(int64_t _k_tensor_uid = 0) {
    return SetField<int64_t>(VT_K_TENSOR_UID, _k_tensor_uid, 0);
  }
  int64_t v_tensor_uid() const {
    return GetField<int64_t>(VT_V_TENSOR_UID, 0);
  }
  bool mutate_v_tensor_uid(int64_t _v_tensor_uid = 0) {
    return SetField<int64_t>(VT_V_TENSOR_UID, _v_tensor_uid, 0);
  }
  int64_t o_tensor_uid() const {
    return GetField<int64_t>(VT_O_TENSOR_UID, 0);
  }
  bool mutate_o_tensor_uid(int64_t _o_tensor_uid = 0) {
    return SetField<int64_t>(VT_O_TENSOR_UID, _o_tensor_uid, 0);
  }
  int64_t do_tensor_uid() const {
    return GetField<int64_t>(VT_DO_TENSOR_UID, 0);
  }
  bool mutate_do_tensor_uid(int64_t _do_tensor_uid = 0) {
    return SetField<int64_t>(VT_DO_TENSOR_UID, _do_tensor_uid, 0);
  }
  int64_t stats_tensor_uid() const {
    return GetField<int64_t>(VT_STATS_TENSOR_UID, 0);
  }
  bool mutate_stats_tensor_uid(int64_t _stats_tensor_uid = 0) {
    return SetField<int64_t>(VT_STATS_TENSOR_UID, _stats_tensor_uid, 0);
  }
  int64_t dq_tensor_uid() const {
    return GetField<int64_t>(VT_DQ_TENSOR_UID, 0);
  }
  bool mutate_dq_tensor_uid(int64_t _dq_tensor_uid = 0) {
    return SetField<int64_t>(VT_DQ_TENSOR_UID, _dq_tensor_uid, 0);
  }
  int64_t dk_tensor_uid() const {
    return GetField<int64_t>(VT_DK_TENSOR_UID, 0);
  }
  bool mutate_dk_tensor_uid(int64_t _dk_tensor_uid = 0) {
    return SetField<int64_t>(VT_DK_TENSOR_UID, _dk_tensor_uid, 0);
  }
  int64_t dv_tensor_uid() const {
    return GetField<int64_t>(VT_DV_TENSOR_UID, 0);
  }
  bool mutate_dv_tensor_uid(int64_t _dv_tensor_uid = 0) {
    return SetField<int64_t>(VT_DV_TENSOR_UID, _dv_tensor_uid, 0);
  }
  ::flatbuffers::Optional<int64_t> scale_tensor_uid() const {
    return GetOptional<int64_t, int64_t>(VT_SCALE_TENSOR_UID);
  }
  bool mutate_scale_tensor_uid(int64_t _scale_tensor_uid) {
    return SetField<int64_t>(VT_SCALE_TENSOR_UID, _scale_tensor_uid);
  }
  ::flatbuffers::Optional<int64_t> attn_mask_tensor_uid() const {
    return GetOptional<int64_t, int64_t>(VT_ATTN_MASK_TENSOR_UID);
  }
  bool mutate_attn_mask_tensor_uid(int64_t _attn_mask_tensor_uid) {
    return SetField<int64_t>(VT_ATTN_MASK_TENSOR_UID, _attn_mask_tensor_uid);
  }
  ::flatbuffers::Optional<int64_t> seq_len_q_tensor_uid() const {
    return GetOptional<int64_t, int64_t>(VT_SEQ_LEN_Q_TENSOR_UID);
  }
  bool mutate_seq_len_q_tensor_uid(int64_t _seq_len_q_tensor_uid) {
    return SetField<int64_t>(VT_SEQ_LEN_Q_TENSOR_UID, _seq_len_q_tensor_uid);
  }
  ::flatbuffers::Optional<int64_t> seq_len_kv_tensor_uid() const {
    return GetOptional<int64_t, int64_t>(VT_SEQ_LEN_KV_TENSOR_UID);
  }
  bool mutate_seq_len_kv_tensor_uid(int64_t _seq_len_kv_tensor_uid) {
    return SetField<int64_t>(VT_SEQ_LEN_KV_TENSOR_UID, _seq_len_kv_tensor_uid);
  }
  ::flatbuffers::Optional<int64_t> seed_tensor_uid() const {
    return GetOptional<int64_t, int64_t>(VT_SEED_TENSOR_UID);
  }
  bool mutate_seed_tensor_uid(int64_t _seed_tensor_uid) {
    return SetField<int64_t>(VT_SEED_TENSOR_UID, _seed_tensor_uid);
  }
  ::flatbuffers::Optional<int64_t> offset_tensor_uid() const {
    return GetOptional<int64_t, int64_t>(VT_OFFSET_TENSOR_UID);
  }
  bool mutate_offset_tensor_uid(int64_t _offset_tensor_uid) {
    return SetField<int64_t>(VT_OFFSET_TENSOR_UID, _offset_tensor_uid);
  }
  ::flatbuffers::Optional<int64_t> dropout_mask_tensor_uid() const {
    return GetOptional<int64_t, int64_t>(VT_DROPOUT_MASK_TENSOR_UID);
  }
  bool mutate_dropout_mask_tensor_uid(int64_t _dropout_mask_tensor_uid) {
    return SetField<int64_t>(VT_DROPOUT_MASK_TENSOR_UID, _dropout_mask_tensor_uid);
  }
  ::flatbuffers::Optional<int64_t> dropout_scale_tensor_uid() const {
    return GetOptional<int64_t, int64_t>(VT_DROPOUT_SCALE_TENSOR_UID);
  }
  bool mutate_dropout_scale_tensor_uid(int64_t _dropout_scale_tensor_uid) {
    return SetField<int64_t>(VT_DROPOUT_SCALE_TENSOR_UID, _dropout_scale_tensor_uid);
  }
  ::flatbuffers::Optional<int64_t> dropout_scale_inv_tensor_uid() const {
    return GetOptional<int64_t, int64_t>(VT_DROPOUT_SCALE_INV_TENSOR_UID);
  }
  bool mutate_dropout_scale_inv_tensor_uid(int64_t _dropout_scale_inv_tensor_uid) {
    return SetField<int64_t>(VT_DROPOUT_SCALE_INV_TENSOR_UID, _dropout_scale_inv_tensor_uid);
  }
  ::flatbuffers::Optional<int64_t> dbias_tensor_uid() const {
    return GetOptional<int64_t, int64_t>(VT_DBIAS_TENSOR_UID);
  }
  bool mutate_dbias_tensor_uid(int64_t _dbias_tensor_uid) {
    return SetField<int64_t>(VT_DBIAS_TENSOR_UID, _dbias_tensor_uid);
  }
  bool alibi_mask() const {
    return GetField<uint8_t>(VT_ALIBI_MASK, 0) != 0;
  }
  bool mutate_alibi_mask(bool _alibi_mask = 0) {
    return SetField<uint8_t>(VT_ALIBI_MASK, static_cast<uint8_t>(_alibi_mask), 0);
  }
  bool padding_mask() const {
    return GetField<uint8_t>(VT_PADDING_MASK, 0) != 0;
  }
  bool mutate_padding_mask(bool _padding_mask = 0) {
    return SetField<uint8_t>(VT_PADDING_MASK, static_cast<uint8_t>(_padding_mask), 0);
  }
  bool causal_mask() const {
    return GetField<uint8_t>(VT_CAUSAL_MASK, 0) != 0;
  }
  bool mutate_causal_mask(bool _causal_mask = 0) {
    return SetField<uint8_t>(VT_CAUSAL_MASK, static_cast<uint8_t>(_causal_mask), 0);
  }
  bool causal_mask_bottom_right() const {
    return GetField<uint8_t>(VT_CAUSAL_MASK_BOTTOM_RIGHT, 0) != 0;
  }
  bool mutate_causal_mask_bottom_right(bool _causal_mask_bottom_right = 0) {
    return SetField<uint8_t>(VT_CAUSAL_MASK_BOTTOM_RIGHT, static_cast<uint8_t>(_causal_mask_bottom_right), 0);
  }
  ::flatbuffers::Optional<float> dropout_probability() const {
    return GetOptional<float, float>(VT_DROPOUT_PROBABILITY);
  }
  bool mutate_dropout_probability(float _dropout_probability) {
    return SetField<float>(VT_DROPOUT_PROBABILITY, _dropout_probability);
  }
  ::flatbuffers::Optional<float> attn_scale_value() const {
    return GetOptional<float, float>(VT_ATTN_SCALE_VALUE);
  }
  bool mutate_attn_scale_value(float _attn_scale_value) {
    return SetField<float>(VT_ATTN_SCALE_VALUE, _attn_scale_value);
  }
  ::flatbuffers::Optional<int64_t> left_bound() const {
    return GetOptional<int64_t, int64_t>(VT_LEFT_BOUND);
  }
  bool mutate_left_bound(int64_t _left_bound) {
    return SetField<int64_t>(VT_LEFT_BOUND, _left_bound);
  }
  ::flatbuffers::Optional<int64_t> right_bound() const {
    return GetOptional<int64_t, int64_t>(VT_RIGHT_BOUND);
  }
  bool mutate_right_bound(int64_t _right_bound) {
    return SetField<int64_t>(VT_RIGHT_BOUND, _right_bound);
  }
  hipdnn_flatbuffers_sdk::data_objects::DiagonalAlignment diagonal_alignment() const {
    return static_cast<hipdnn_flatbuffers_sdk::data_objects::DiagonalAlignment>(GetField<int8_t>(VT_DIAGONAL_ALIGNMENT, 0));
  }
  bool mutate_diagonal_alignment(hipdnn_flatbuffers_sdk::data_objects::DiagonalAlignment _diagonal_alignment = static_cast<hipdnn_flatbuffers_sdk::data_objects::DiagonalAlignment>(0)) {
    return SetField<int8_t>(VT_DIAGONAL_ALIGNMENT, static_cast<int8_t>(_diagonal_alignment), 0);
  }
  bool Verify(::flatbuffers::Verifier &verifier) const {
    return VerifyTableStart(verifier) &&
           VerifyField<int64_t>(verifier, VT_Q_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_K_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_V_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_O_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_DO_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_STATS_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_DQ_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_DK_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_DV_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_SCALE_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_ATTN_MASK_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_SEQ_LEN_Q_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_SEQ_LEN_KV_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_SEED_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_OFFSET_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_DROPOUT_MASK_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_DROPOUT_SCALE_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_DROPOUT_SCALE_INV_TENSOR_UID, 8) &&
           VerifyField<int64_t>(verifier, VT_DBIAS_TENSOR_UID, 8) &&
           VerifyField<uint8_t>(verifier, VT_ALIBI_MASK, 1) &&
           VerifyField<uint8_t>(verifier, VT_PADDING_MASK, 1) &&
           VerifyField<uint8_t>(verifier, VT_CAUSAL_MASK, 1) &&
           VerifyField<uint8_t>(verifier, VT_CAUSAL_MASK_BOTTOM_RIGHT, 1) &&
           VerifyField<float>(verifier, VT_DROPOUT_PROBABILITY, 4) &&
           VerifyField<float>(verifier, VT_ATTN_SCALE_VALUE, 4) &&
           VerifyField<int64_t>(verifier, VT_LEFT_BOUND, 8) &&
           VerifyField<int64_t>(verifier, VT_RIGHT_BOUND, 8) &&
           VerifyField<int8_t>(verifier, VT_DIAGONAL_ALIGNMENT, 1) &&
           verifier.EndTable();
  }
  SdpaBackwardAttributesT *UnPack(const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
  void UnPackTo(SdpaBackwardAttributesT *_o, const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
  static ::flatbuffers::Offset<SdpaBackwardAttributes> Pack(::flatbuffers::FlatBufferBuilder &_fbb, const SdpaBackwardAttributesT* _o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
};

struct SdpaBackwardAttributesBuilder {
  typedef SdpaBackwardAttributes Table;
  ::flatbuffers::FlatBufferBuilder &fbb_;
  ::flatbuffers::uoffset_t start_;
  void add_q_tensor_uid(int64_t q_tensor_uid) {
    fbb_.AddElement<int64_t>(SdpaBackwardAttributes::VT_Q_TENSOR_UID, q_tensor_uid, 0);
  }
  void add_k_tensor_uid(int64_t k_tensor_uid) {
    fbb_.AddElement<int64_t>(SdpaBackwardAttributes::VT_K_TENSOR_UID, k_tensor_uid, 0);
  }
  void add_v_tensor_uid(int64_t v_tensor_uid) {
    fbb_.AddElement<int64_t>(SdpaBackwardAttributes::VT_V_TENSOR_UID, v_tensor_uid, 0);
  }
  void add_o_tensor_uid(int64_t o_tensor_uid) {
    fbb_.AddElement<int64_t>(SdpaBackwardAttributes::VT_O_TENSOR_UID, o_tensor_uid, 0);
  }
  void add_do_tensor_uid(int64_t do_tensor_uid) {
    fbb_.AddElement<int64_t>(SdpaBackwardAttributes::VT_DO_TENSOR_UID, do_tensor_uid, 0);
  }
  void add_stats_tensor_uid(int64_t stats_tensor_uid) {
    fbb_.AddElement<int64_t>(SdpaBackwardAttributes::VT_STATS_TENSOR_UID, stats_tensor_uid, 0);
  }
  void add_dq_tensor_uid(int64_t dq_tensor_uid) {
    fbb_.AddElement<int64_t>(SdpaBackwardAttributes::VT_DQ_TENSOR_UID, dq_tensor_uid, 0);
  }
  void add_dk_tensor_uid(int64_t dk_tensor_uid) {
    fbb_.AddElement<int64_t>(SdpaBackwardAttributes::VT_DK_TENSOR_UID, dk_tensor_uid, 0);
  }
  void add_dv_tensor_uid(int64_t dv_tensor_uid) {
    fbb_.AddElement<int64_t>(SdpaBackwardAttributes::VT_DV_TENSOR_UID, dv_tensor_uid, 0);
  }
  void add_scale_tensor_uid(int64_t scale_tensor_uid) {
    fbb_.AddElement<int64_t>(SdpaBackwardAttributes::VT_SCALE_TENSOR_UID, scale_tensor_uid);
  }
  void add_attn_mask_tensor_uid(int64_t attn_mask_tensor_uid) {
    fbb_.AddElement<int64_t>(SdpaBackwardAttributes::VT_ATTN_MASK_TENSOR_UID, attn_mask_tensor_uid);
  }
  void add_seq_len_q_tensor_uid(int64_t seq_len_q_tensor_uid) {
    fbb_.AddElement<int64_t>(SdpaBackwardAttributes::VT_SEQ_LEN_Q_TENSOR_UID, seq_len_q_tensor_uid);
  }
  void add_seq_len_kv_tensor_uid(int64_t seq_len_kv_tensor_uid) {
    fbb_.AddElement<int64_t>(SdpaBackwardAttributes::VT_SEQ_LEN_KV_TENSOR_UID, seq_len_kv_tensor_uid);
  }
  void add_seed_tensor_uid(int64_t seed_tensor_uid) {
    fbb_.AddElement<int64_t>(SdpaBackwardAttributes::VT_SEED_TENSOR_UID, seed_tensor_uid);
  }
  void add_offset_tensor_uid(int64_t offset_tensor_uid) {
    fbb_.AddElement<int64_t>(SdpaBackwardAttributes::VT_OFFSET_TENSOR_UID, offset_tensor_uid);
  }
  void add_dropout_mask_tensor_uid(int64_t dropout_mask_tensor_uid) {
    fbb_.AddElement<int64_t>(SdpaBackwardAttributes::VT_DROPOUT_MASK_TENSOR_UID, dropout_mask_tensor_uid);
  }
  void add_dropout_scale_tensor_uid(int64_t dropout_scale_tensor_uid) {
    fbb_.AddElement<int64_t>(SdpaBackwardAttributes::VT_DROPOUT_SCALE_TENSOR_UID, dropout_scale_tensor_uid);
  }
  void add_dropout_scale_inv_tensor_uid(int64_t dropout_scale_inv_tensor_uid) {
    fbb_.AddElement<int64_t>(SdpaBackwardAttributes::VT_DROPOUT_SCALE_INV_TENSOR_UID, dropout_scale_inv_tensor_uid);
  }
  void add_dbias_tensor_uid(int64_t dbias_tensor_uid) {
    fbb_.AddElement<int64_t>(SdpaBackwardAttributes::VT_DBIAS_TENSOR_UID, dbias_tensor_uid);
  }
  void add_alibi_mask(bool alibi_mask) {
    fbb_.AddElement<uint8_t>(SdpaBackwardAttributes::VT_ALIBI_MASK, static_cast<uint8_t>(alibi_mask), 0);
  }
  void add_padding_mask(bool padding_mask) {
    fbb_.AddElement<uint8_t>(SdpaBackwardAttributes::VT_PADDING_MASK, static_cast<uint8_t>(padding_mask), 0);
  }
  void add_causal_mask(bool causal_mask) {
    fbb_.AddElement<uint8_t>(SdpaBackwardAttributes::VT_CAUSAL_MASK, static_cast<uint8_t>(causal_mask), 0);
  }
  void add_causal_mask_bottom_right(bool causal_mask_bottom_right) {
    fbb_.AddElement<uint8_t>(SdpaBackwardAttributes::VT_CAUSAL_MASK_BOTTOM_RIGHT, static_cast<uint8_t>(causal_mask_bottom_right), 0);
  }
  void add_dropout_probability(float dropout_probability) {
    fbb_.AddElement<float>(SdpaBackwardAttributes::VT_DROPOUT_PROBABILITY, dropout_probability);
  }
  void add_attn_scale_value(float attn_scale_value) {
    fbb_.AddElement<float>(SdpaBackwardAttributes::VT_ATTN_SCALE_VALUE, attn_scale_value);
  }
  void add_left_bound(int64_t left_bound) {
    fbb_.AddElement<int64_t>(SdpaBackwardAttributes::VT_LEFT_BOUND, left_bound);
  }
  void add_right_bound(int64_t right_bound) {
    fbb_.AddElement<int64_t>(SdpaBackwardAttributes::VT_RIGHT_BOUND, right_bound);
  }
  void add_diagonal_alignment(hipdnn_flatbuffers_sdk::data_objects::DiagonalAlignment diagonal_alignment) {
    fbb_.AddElement<int8_t>(SdpaBackwardAttributes::VT_DIAGONAL_ALIGNMENT, static_cast<int8_t>(diagonal_alignment), 0);
  }
  explicit SdpaBackwardAttributesBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
        : fbb_(_fbb) {
    start_ = fbb_.StartTable();
  }
  ::flatbuffers::Offset<SdpaBackwardAttributes> Finish() {
    const auto end = fbb_.EndTable(start_);
    auto o = ::flatbuffers::Offset<SdpaBackwardAttributes>(end);
    return o;
  }
};

inline ::flatbuffers::Offset<SdpaBackwardAttributes> CreateSdpaBackwardAttributes(
    ::flatbuffers::FlatBufferBuilder &_fbb,
    int64_t q_tensor_uid = 0,
    int64_t k_tensor_uid = 0,
    int64_t v_tensor_uid = 0,
    int64_t o_tensor_uid = 0,
    int64_t do_tensor_uid = 0,
    int64_t stats_tensor_uid = 0,
    int64_t dq_tensor_uid = 0,
    int64_t dk_tensor_uid = 0,
    int64_t dv_tensor_uid = 0,
    ::flatbuffers::Optional<int64_t> scale_tensor_uid = ::flatbuffers::nullopt,
    ::flatbuffers::Optional<int64_t> attn_mask_tensor_uid = ::flatbuffers::nullopt,
    ::flatbuffers::Optional<int64_t> seq_len_q_tensor_uid = ::flatbuffers::nullopt,
    ::flatbuffers::Optional<int64_t> seq_len_kv_tensor_uid = ::flatbuffers::nullopt,
    ::flatbuffers::Optional<int64_t> seed_tensor_uid = ::flatbuffers::nullopt,
    ::flatbuffers::Optional<int64_t> offset_tensor_uid = ::flatbuffers::nullopt,
    ::flatbuffers::Optional<int64_t> dropout_mask_tensor_uid = ::flatbuffers::nullopt,
    ::flatbuffers::Optional<int64_t> dropout_scale_tensor_uid = ::flatbuffers::nullopt,
    ::flatbuffers::Optional<int64_t> dropout_scale_inv_tensor_uid = ::flatbuffers::nullopt,
    ::flatbuffers::Optional<int64_t> dbias_tensor_uid = ::flatbuffers::nullopt,
    bool alibi_mask = false,
    bool padding_mask = false,
    bool causal_mask = false,
    bool causal_mask_bottom_right = false,
    ::flatbuffers::Optional<float> dropout_probability = ::flatbuffers::nullopt,
    ::flatbuffers::Optional<float> attn_scale_value = ::flatbuffers::nullopt,
    ::flatbuffers::Optional<int64_t> left_bound = ::flatbuffers::nullopt,
    ::flatbuffers::Optional<int64_t> right_bound = ::flatbuffers::nullopt,
    hipdnn_flatbuffers_sdk::data_objects::DiagonalAlignment diagonal_alignment = hipdnn_flatbuffers_sdk::data_objects::DiagonalAlignment::TOP_LEFT) {
  SdpaBackwardAttributesBuilder builder_(_fbb);
  if(right_bound) { builder_.add_right_bound(*right_bound); }
  if(left_bound) { builder_.add_left_bound(*left_bound); }
  if(dbias_tensor_uid) { builder_.add_dbias_tensor_uid(*dbias_tensor_uid); }
  if(dropout_scale_inv_tensor_uid) { builder_.add_dropout_scale_inv_tensor_uid(*dropout_scale_inv_tensor_uid); }
  if(dropout_scale_tensor_uid) { builder_.add_dropout_scale_tensor_uid(*dropout_scale_tensor_uid); }
  if(dropout_mask_tensor_uid) { builder_.add_dropout_mask_tensor_uid(*dropout_mask_tensor_uid); }
  if(offset_tensor_uid) { builder_.add_offset_tensor_uid(*offset_tensor_uid); }
  if(seed_tensor_uid) { builder_.add_seed_tensor_uid(*seed_tensor_uid); }
  if(seq_len_kv_tensor_uid) { builder_.add_seq_len_kv_tensor_uid(*seq_len_kv_tensor_uid); }
  if(seq_len_q_tensor_uid) { builder_.add_seq_len_q_tensor_uid(*seq_len_q_tensor_uid); }
  if(attn_mask_tensor_uid) { builder_.add_attn_mask_tensor_uid(*attn_mask_tensor_uid); }
  if(scale_tensor_uid) { builder_.add_scale_tensor_uid(*scale_tensor_uid); }
  builder_.add_dv_tensor_uid(dv_tensor_uid);
  builder_.add_dk_tensor_uid(dk_tensor_uid);
  builder_.add_dq_tensor_uid(dq_tensor_uid);
  builder_.add_stats_tensor_uid(stats_tensor_uid);
  builder_.add_do_tensor_uid(do_tensor_uid);
  builder_.add_o_tensor_uid(o_tensor_uid);
  builder_.add_v_tensor_uid(v_tensor_uid);
  builder_.add_k_tensor_uid(k_tensor_uid);
  builder_.add_q_tensor_uid(q_tensor_uid);
  if(attn_scale_value) { builder_.add_attn_scale_value(*attn_scale_value); }
  if(dropout_probability) { builder_.add_dropout_probability(*dropout_probability); }
  builder_.add_diagonal_alignment(diagonal_alignment);
  builder_.add_causal_mask_bottom_right(causal_mask_bottom_right);
  builder_.add_causal_mask(causal_mask);
  builder_.add_padding_mask(padding_mask);
  builder_.add_alibi_mask(alibi_mask);
  return builder_.Finish();
}

::flatbuffers::Offset<SdpaBackwardAttributes> CreateSdpaBackwardAttributes(::flatbuffers::FlatBufferBuilder &_fbb, const SdpaBackwardAttributesT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);


inline bool operator==(const SdpaBackwardAttributesT &lhs, const SdpaBackwardAttributesT &rhs) {
  return
      (lhs.q_tensor_uid == rhs.q_tensor_uid) &&
      (lhs.k_tensor_uid == rhs.k_tensor_uid) &&
      (lhs.v_tensor_uid == rhs.v_tensor_uid) &&
      (lhs.o_tensor_uid == rhs.o_tensor_uid) &&
      (lhs.do_tensor_uid == rhs.do_tensor_uid) &&
      (lhs.stats_tensor_uid == rhs.stats_tensor_uid) &&
      (lhs.dq_tensor_uid == rhs.dq_tensor_uid) &&
      (lhs.dk_tensor_uid == rhs.dk_tensor_uid) &&
      (lhs.dv_tensor_uid == rhs.dv_tensor_uid) &&
      (lhs.scale_tensor_uid == rhs.scale_tensor_uid) &&
      (lhs.attn_mask_tensor_uid == rhs.attn_mask_tensor_uid) &&
      (lhs.seq_len_q_tensor_uid == rhs.seq_len_q_tensor_uid) &&
      (lhs.seq_len_kv_tensor_uid == rhs.seq_len_kv_tensor_uid) &&
      (lhs.seed_tensor_uid == rhs.seed_tensor_uid) &&
      (lhs.offset_tensor_uid == rhs.offset_tensor_uid) &&
      (lhs.dropout_mask_tensor_uid == rhs.dropout_mask_tensor_uid) &&
      (lhs.dropout_scale_tensor_uid == rhs.dropout_scale_tensor_uid) &&
      (lhs.dropout_scale_inv_tensor_uid == rhs.dropout_scale_inv_tensor_uid) &&
      (lhs.dbias_tensor_uid == rhs.dbias_tensor_uid) &&
      (lhs.alibi_mask == rhs.alibi_mask) &&
      (lhs.padding_mask == rhs.padding_mask) &&
      (lhs.causal_mask == rhs.causal_mask) &&
      (lhs.causal_mask_bottom_right == rhs.causal_mask_bottom_right) &&
      (lhs.dropout_probability == rhs.dropout_probability) &&
      (lhs.attn_scale_value == rhs.attn_scale_value) &&
      (lhs.left_bound == rhs.left_bound) &&
      (lhs.right_bound == rhs.right_bound) &&
      (lhs.diagonal_alignment == rhs.diagonal_alignment);
}

inline bool operator!=(const SdpaBackwardAttributesT &lhs, const SdpaBackwardAttributesT &rhs) {
    return !(lhs == rhs);
}


inline SdpaBackwardAttributesT *SdpaBackwardAttributes::UnPack(const ::flatbuffers::resolver_function_t *_resolver) const {
  auto _o = std::unique_ptr<SdpaBackwardAttributesT>(new SdpaBackwardAttributesT());
  UnPackTo(_o.get(), _resolver);
  return _o.release();
}

inline void SdpaBackwardAttributes::UnPackTo(SdpaBackwardAttributesT *_o, const ::flatbuffers::resolver_function_t *_resolver) const {
  (void)_o;
  (void)_resolver;
  { auto _e = q_tensor_uid(); _o->q_tensor_uid = _e; }
  { auto _e = k_tensor_uid(); _o->k_tensor_uid = _e; }
  { auto _e = v_tensor_uid(); _o->v_tensor_uid = _e; }
  { auto _e = o_tensor_uid(); _o->o_tensor_uid = _e; }
  { auto _e = do_tensor_uid(); _o->do_tensor_uid = _e; }
  { auto _e = stats_tensor_uid(); _o->stats_tensor_uid = _e; }
  { auto _e = dq_tensor_uid(); _o->dq_tensor_uid = _e; }
  { auto _e = dk_tensor_uid(); _o->dk_tensor_uid = _e; }
  { auto _e = dv_tensor_uid(); _o->dv_tensor_uid = _e; }
  { auto _e = scale_tensor_uid(); _o->scale_tensor_uid = _e; }
  { auto _e = attn_mask_tensor_uid(); _o->attn_mask_tensor_uid = _e; }
  { auto _e = seq_len_q_tensor_uid(); _o->seq_len_q_tensor_uid = _e; }
  { auto _e = seq_len_kv_tensor_uid(); _o->seq_len_kv_tensor_uid = _e; }
  { auto _e = seed_tensor_uid(); _o->seed_tensor_uid = _e; }
  { auto _e = offset_tensor_uid(); _o->offset_tensor_uid = _e; }
  { auto _e = dropout_mask_tensor_uid(); _o->dropout_mask_tensor_uid = _e; }
  { auto _e = dropout_scale_tensor_uid(); _o->dropout_scale_tensor_uid = _e; }
  { auto _e = dropout_scale_inv_tensor_uid(); _o->dropout_scale_inv_tensor_uid = _e; }
  { auto _e = dbias_tensor_uid(); _o->dbias_tensor_uid = _e; }
  { auto _e = alibi_mask(); _o->alibi_mask = _e; }
  { auto _e = padding_mask(); _o->padding_mask = _e; }
  { auto _e = causal_mask(); _o->causal_mask = _e; }
  { auto _e = causal_mask_bottom_right(); _o->causal_mask_bottom_right = _e; }
  { auto _e = dropout_probability(); _o->dropout_probability = _e; }
  { auto _e = attn_scale_value(); _o->attn_scale_value = _e; }
  { auto _e = left_bound(); _o->left_bound = _e; }
  { auto _e = right_bound(); _o->right_bound = _e; }
  { auto _e = diagonal_alignment(); _o->diagonal_alignment = _e; }
}

inline ::flatbuffers::Offset<SdpaBackwardAttributes> SdpaBackwardAttributes::Pack(::flatbuffers::FlatBufferBuilder &_fbb, const SdpaBackwardAttributesT* _o, const ::flatbuffers::rehasher_function_t *_rehasher) {
  return CreateSdpaBackwardAttributes(_fbb, _o, _rehasher);
}

inline ::flatbuffers::Offset<SdpaBackwardAttributes> CreateSdpaBackwardAttributes(::flatbuffers::FlatBufferBuilder &_fbb, const SdpaBackwardAttributesT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) {
  (void)_rehasher;
  (void)_o;
  struct _VectorArgs { ::flatbuffers::FlatBufferBuilder *__fbb; const SdpaBackwardAttributesT* __o; const ::flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
  auto _q_tensor_uid = _o->q_tensor_uid;
  auto _k_tensor_uid = _o->k_tensor_uid;
  auto _v_tensor_uid = _o->v_tensor_uid;
  auto _o_tensor_uid = _o->o_tensor_uid;
  auto _do_tensor_uid = _o->do_tensor_uid;
  auto _stats_tensor_uid = _o->stats_tensor_uid;
  auto _dq_tensor_uid = _o->dq_tensor_uid;
  auto _dk_tensor_uid = _o->dk_tensor_uid;
  auto _dv_tensor_uid = _o->dv_tensor_uid;
  auto _scale_tensor_uid = _o->scale_tensor_uid;
  auto _attn_mask_tensor_uid = _o->attn_mask_tensor_uid;
  auto _seq_len_q_tensor_uid = _o->seq_len_q_tensor_uid;
  auto _seq_len_kv_tensor_uid = _o->seq_len_kv_tensor_uid;
  auto _seed_tensor_uid = _o->seed_tensor_uid;
  auto _offset_tensor_uid = _o->offset_tensor_uid;
  auto _dropout_mask_tensor_uid = _o->dropout_mask_tensor_uid;
  auto _dropout_scale_tensor_uid = _o->dropout_scale_tensor_uid;
  auto _dropout_scale_inv_tensor_uid = _o->dropout_scale_inv_tensor_uid;
  auto _dbias_tensor_uid = _o->dbias_tensor_uid;
  auto _alibi_mask = _o->alibi_mask;
  auto _padding_mask = _o->padding_mask;
  auto _causal_mask = _o->causal_mask;
  auto _causal_mask_bottom_right = _o->causal_mask_bottom_right;
  auto _dropout_probability = _o->dropout_probability;
  auto _attn_scale_value = _o->attn_scale_value;
  auto _left_bound = _o->left_bound;
  auto _right_bound = _o->right_bound;
  auto _diagonal_alignment = _o->diagonal_alignment;
  return hipdnn_flatbuffers_sdk::data_objects::CreateSdpaBackwardAttributes(
      _fbb,
      _q_tensor_uid,
      _k_tensor_uid,
      _v_tensor_uid,
      _o_tensor_uid,
      _do_tensor_uid,
      _stats_tensor_uid,
      _dq_tensor_uid,
      _dk_tensor_uid,
      _dv_tensor_uid,
      _scale_tensor_uid,
      _attn_mask_tensor_uid,
      _seq_len_q_tensor_uid,
      _seq_len_kv_tensor_uid,
      _seed_tensor_uid,
      _offset_tensor_uid,
      _dropout_mask_tensor_uid,
      _dropout_scale_tensor_uid,
      _dropout_scale_inv_tensor_uid,
      _dbias_tensor_uid,
      _alibi_mask,
      _padding_mask,
      _causal_mask,
      _causal_mask_bottom_right,
      _dropout_probability,
      _attn_scale_value,
      _left_bound,
      _right_bound,
      _diagonal_alignment);
}

}  // namespace data_objects
}  // namespace hipdnn_flatbuffers_sdk

#endif  // FLATBUFFERS_GENERATED_SDPABACKWARDATTRIBUTES_HIPDNN_FLATBUFFERS_SDK_DATA_OBJECTS_H_
