4 #ifndef FLATBUFFERS_GENERATED_PROGRAM_TT_TARGET_METAL_H_
5 #define FLATBUFFERS_GENERATED_PROGRAM_TT_TARGET_METAL_H_
7 #include "flatbuffers/flatbuffers.h"
11 static_assert(FLATBUFFERS_VERSION_MAJOR == 24 &&
12 FLATBUFFERS_VERSION_MINOR == 3 &&
13 FLATBUFFERS_VERSION_REVISION == 25,
14 "Non-compatible flatbuffers version included");
23 struct NocConfigBuilder;
26 struct TensixConfigBuilder;
29 struct EthernetConfigBuilder;
32 struct KernelSourceBuilder;
35 struct KernelBinaryBuilder;
38 struct RuntimeArgTensorAddressBuilder;
41 struct RuntimeArgSemaphoreAddressBuilder;
44 struct KernelDescBuilder;
47 struct ProgramDescBuilder;
65 static const char *
const names[3] = {
75 const size_t index =
static_cast<size_t>(e);
87 static const EthType values[] = {
95 static const char *
const names[3] = {
105 const size_t index =
static_cast<size_t>(e);
125 static const char *
const names[3] = {
135 const size_t index =
static_cast<size_t>(e);
159 static const char *
const names[5] = {
171 const size_t index =
static_cast<size_t>(e);
192 bool VerifyKernelConfigVector(::flatbuffers::Verifier &verifier, const ::flatbuffers::Vector<::flatbuffers::Offset<void>> *values, const ::flatbuffers::Vector<KernelConfig> *types);
218 static const char *
const names[7] = {
232 const size_t index =
static_cast<size_t>(e);
252 static const char *
const names[3] = {
262 const size_t index =
static_cast<size_t>(e);
275 static const Kernel values[] = {
284 static const char *
const names[4] = {
295 const size_t index =
static_cast<size_t>(e);
312 bool VerifyKernelVector(::flatbuffers::Verifier &verifier, const ::flatbuffers::Vector<::flatbuffers::Offset<void>> *values, const ::flatbuffers::Vector<Kernel> *types);
332 static const char *
const names[4] = {
334 "RuntimeArgTensorAddress",
335 "RuntimeArgSemaphoreAddress",
343 const size_t index =
static_cast<size_t>(e);
360 bool VerifyRuntimeArgVector(::flatbuffers::Verifier &verifier, const ::flatbuffers::Vector<::flatbuffers::Offset<void>> *values, const ::flatbuffers::Vector<RuntimeArg> *types);
365 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
371 bool Verify(::flatbuffers::Verifier &verifier)
const {
372 return VerifyTableStart(verifier) &&
373 VerifyField<uint16_t>(verifier, VT_NOC_INDEX, 2) &&
380 ::flatbuffers::FlatBufferBuilder &
fbb_;
383 fbb_.AddElement<uint16_t>(NocConfig::VT_NOC_INDEX,
static_cast<uint16_t
>(noc_index), 0);
389 ::flatbuffers::Offset<NocConfig>
Finish() {
391 auto o = ::flatbuffers::Offset<NocConfig>(end);
397 ::flatbuffers::FlatBufferBuilder &_fbb,
412 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
416 VT_UNPACK_TO_DEST_MODE = 10
428 return GetPointer<const ::flatbuffers::Vector<tt::target::metal::UnpackToDestMode> *>(VT_UNPACK_TO_DEST_MODE);
430 bool Verify(::flatbuffers::Verifier &verifier)
const {
431 return VerifyTableStart(verifier) &&
435 VerifyOffset(verifier, VT_UNPACK_TO_DEST_MODE) &&
436 verifier.VerifyVector(unpack_to_dest_mode()) &&
443 ::flatbuffers::FlatBufferBuilder &
fbb_;
454 void add_unpack_to_dest_mode(::flatbuffers::Offset<::flatbuffers::Vector<tt::target::metal::UnpackToDestMode>> unpack_to_dest_mode) {
455 fbb_.AddOffset(TensixConfig::VT_UNPACK_TO_DEST_MODE, unpack_to_dest_mode);
461 ::flatbuffers::Offset<TensixConfig>
Finish() {
463 auto o = ::flatbuffers::Offset<TensixConfig>(end);
469 ::flatbuffers::FlatBufferBuilder &_fbb,
471 bool fp32_dest_acc_en =
false,
472 bool math_approx_mode =
false,
473 ::flatbuffers::Offset<::flatbuffers::Vector<tt::target::metal::UnpackToDestMode>> unpack_to_dest_mode = 0) {
488 ::flatbuffers::FlatBufferBuilder &_fbb,
490 bool fp32_dest_acc_en =
false,
491 bool math_approx_mode =
false,
492 const std::vector<tt::target::metal::UnpackToDestMode> *unpack_to_dest_mode =
nullptr) {
499 unpack_to_dest_mode__);
505 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
515 bool Verify(::flatbuffers::Verifier &verifier)
const {
516 return VerifyTableStart(verifier) &&
518 VerifyField<uint16_t>(verifier, VT_NOC_INDEX, 2) &&
525 ::flatbuffers::FlatBufferBuilder &
fbb_;
531 fbb_.AddElement<uint16_t>(EthernetConfig::VT_NOC_INDEX,
static_cast<uint16_t
>(noc_index), 0);
537 ::flatbuffers::Offset<EthernetConfig>
Finish() {
539 auto o = ::flatbuffers::Offset<EthernetConfig>(end);
545 ::flatbuffers::FlatBufferBuilder &_fbb,
562 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
567 const ::flatbuffers::String *
source()
const {
568 return GetPointer<const ::flatbuffers::String *>(
VT_SOURCE);
574 return GetPointer<const void *>(VT_CONFIG);
586 bool Verify(::flatbuffers::Verifier &verifier)
const {
587 return VerifyTableStart(verifier) &&
589 verifier.VerifyString(source()) &&
591 VerifyOffset(verifier, VT_CONFIG) &&
597 template<>
inline const tt::target::metal::NocConfig *KernelSource::config_as<tt::target::metal::NocConfig>()
const {
598 return config_as_NocConfig();
601 template<>
inline const tt::target::metal::TensixConfig *KernelSource::config_as<tt::target::metal::TensixConfig>()
const {
602 return config_as_TensixConfig();
605 template<>
inline const tt::target::metal::EthernetConfig *KernelSource::config_as<tt::target::metal::EthernetConfig>()
const {
606 return config_as_EthernetConfig();
611 ::flatbuffers::FlatBufferBuilder &
fbb_;
613 void add_source(::flatbuffers::Offset<::flatbuffers::String> source) {
620 fbb_.AddOffset(KernelSource::VT_CONFIG, config);
626 ::flatbuffers::Offset<KernelSource>
Finish() {
628 auto o = ::flatbuffers::Offset<KernelSource>(end);
634 ::flatbuffers::FlatBufferBuilder &_fbb,
635 ::flatbuffers::Offset<::flatbuffers::String> source = 0,
637 ::flatbuffers::Offset<void> config = 0) {
651 ::flatbuffers::FlatBufferBuilder &_fbb,
652 const char *source =
nullptr,
654 ::flatbuffers::Offset<void> config = 0) {
655 auto source__ = source ? _fbb.CreateString(source) : 0;
666 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
674 const ::flatbuffers::Vector<uint8_t> *
data()
const {
675 return GetPointer<const ::flatbuffers::Vector<uint8_t> *>(
VT_DATA);
678 return GetPointer<const ::flatbuffers::String *>(VT_DEBUG_SOURCE);
680 bool Verify(::flatbuffers::Verifier &verifier)
const {
681 return VerifyTableStart(verifier) &&
683 VerifyOffset(verifier,
VT_DATA) &&
684 verifier.VerifyVector(data()) &&
685 VerifyOffset(verifier, VT_DEBUG_SOURCE) &&
686 verifier.VerifyString(debug_source()) &&
693 ::flatbuffers::FlatBufferBuilder &
fbb_;
698 void add_data(::flatbuffers::Offset<::flatbuffers::Vector<uint8_t>> data) {
702 fbb_.AddOffset(KernelBinary::VT_DEBUG_SOURCE, debug_source);
708 ::flatbuffers::Offset<KernelBinary>
Finish() {
710 auto o = ::flatbuffers::Offset<KernelBinary>(end);
716 ::flatbuffers::FlatBufferBuilder &_fbb,
718 ::flatbuffers::Offset<::flatbuffers::Vector<uint8_t>> data = 0,
719 ::flatbuffers::Offset<::flatbuffers::String> debug_source = 0) {
733 ::flatbuffers::FlatBufferBuilder &_fbb,
735 const std::vector<uint8_t> *data =
nullptr,
736 const char *debug_source =
nullptr) {
737 auto data__ = data ? _fbb.CreateVector<uint8_t>(*data) : 0;
738 auto debug_source__ = debug_source ? _fbb.CreateString(debug_source) : 0;
749 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
753 return GetField<uint32_t>(VT_OPERAND_IDX, 0);
755 bool Verify(::flatbuffers::Verifier &verifier)
const {
756 return VerifyTableStart(verifier) &&
757 VerifyField<uint32_t>(verifier, VT_OPERAND_IDX, 4) &&
764 ::flatbuffers::FlatBufferBuilder &
fbb_;
767 fbb_.AddElement<uint32_t>(RuntimeArgTensorAddress::VT_OPERAND_IDX, operand_idx, 0);
773 ::flatbuffers::Offset<RuntimeArgTensorAddress>
Finish() {
775 auto o = ::flatbuffers::Offset<RuntimeArgTensorAddress>(end);
781 ::flatbuffers::FlatBufferBuilder &_fbb,
782 uint32_t operand_idx = 0) {
796 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
806 bool Verify(::flatbuffers::Verifier &verifier)
const {
807 return VerifyTableStart(verifier) &&
816 ::flatbuffers::FlatBufferBuilder &
fbb_;
828 ::flatbuffers::Offset<RuntimeArgSemaphoreAddress>
Finish() {
830 auto o = ::flatbuffers::Offset<RuntimeArgSemaphoreAddress>(end);
836 ::flatbuffers::FlatBufferBuilder &_fbb,
837 uint32_t initial_value = 0,
853 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
866 return GetPointer<const void *>(
VT_KERNEL);
875 const ::flatbuffers::Vector<const tt::target::Dim2dRange *> *
core_range_set()
const {
876 return GetPointer<const ::flatbuffers::Vector<const tt::target::Dim2dRange *> *>(
VT_CORE_RANGE_SET);
878 const ::flatbuffers::Vector<::flatbuffers::Offset<tt::target::CBRef>> *
cbs()
const {
879 return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<tt::target::CBRef>> *>(
VT_CBS);
882 return GetPointer<const ::flatbuffers::Vector<tt::target::metal::RuntimeArg> *>(
VT_RUNTIME_ARGS_TYPE);
884 const ::flatbuffers::Vector<::flatbuffers::Offset<void>> *
runtime_args()
const {
885 return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<void>> *>(
VT_RUNTIME_ARGS);
888 return GetPointer<const ::flatbuffers::String *>(VT_DEBUG_INFO);
890 bool Verify(::flatbuffers::Verifier &verifier)
const {
891 return VerifyTableStart(verifier) &&
896 verifier.VerifyVector(core_range_set()) &&
897 VerifyOffset(verifier,
VT_CBS) &&
898 verifier.VerifyVector(cbs()) &&
899 verifier.VerifyVectorOfTables(cbs()) &&
901 verifier.VerifyVector(runtime_args_type()) &&
903 verifier.VerifyVector(runtime_args()) &&
905 VerifyOffset(verifier, VT_DEBUG_INFO) &&
906 verifier.VerifyString(debug_info()) &&
911 template<>
inline const tt::target::metal::KernelSource *KernelDesc::kernel_as<tt::target::metal::KernelSource>()
const {
912 return kernel_as_KernelSource();
915 template<>
inline const tt::target::metal::KernelBinary *KernelDesc::kernel_as<tt::target::metal::KernelBinary>()
const {
916 return kernel_as_KernelBinary();
921 ::flatbuffers::FlatBufferBuilder &
fbb_;
929 void add_core_range_set(::flatbuffers::Offset<::flatbuffers::Vector<const tt::target::Dim2dRange *>> core_range_set) {
932 void add_cbs(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<tt::target::CBRef>>> cbs) {
935 void add_runtime_args_type(::flatbuffers::Offset<::flatbuffers::Vector<tt::target::metal::RuntimeArg>> runtime_args_type) {
938 void add_runtime_args(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<void>>> runtime_args) {
942 fbb_.AddOffset(KernelDesc::VT_DEBUG_INFO, debug_info);
948 ::flatbuffers::Offset<KernelDesc>
Finish() {
950 auto o = ::flatbuffers::Offset<KernelDesc>(end);
956 ::flatbuffers::FlatBufferBuilder &_fbb,
958 ::flatbuffers::Offset<void> kernel = 0,
959 ::flatbuffers::Offset<::flatbuffers::Vector<const tt::target::Dim2dRange *>> core_range_set = 0,
960 ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<tt::target::CBRef>>> cbs = 0,
961 ::flatbuffers::Offset<::flatbuffers::Vector<tt::target::metal::RuntimeArg>> runtime_args_type = 0,
962 ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<void>>> runtime_args = 0,
963 ::flatbuffers::Offset<::flatbuffers::String> debug_info = 0) {
981 ::flatbuffers::FlatBufferBuilder &_fbb,
983 ::flatbuffers::Offset<void> kernel = 0,
984 const std::vector<tt::target::Dim2dRange> *core_range_set =
nullptr,
985 const std::vector<::flatbuffers::Offset<tt::target::CBRef>> *cbs =
nullptr,
986 const std::vector<tt::target::metal::RuntimeArg> *runtime_args_type =
nullptr,
987 const std::vector<::flatbuffers::Offset<void>> *runtime_args =
nullptr,
988 const char *debug_info =
nullptr) {
989 auto core_range_set__ = core_range_set ? _fbb.CreateVectorOfStructs<tt::target::Dim2dRange>(*core_range_set) : 0;
990 auto cbs__ = cbs ? _fbb.CreateVector<::flatbuffers::Offset<tt::target::CBRef>>(*cbs) : 0;
992 auto runtime_args__ = runtime_args ? _fbb.CreateVector<::flatbuffers::Offset<void>>(*runtime_args) : 0;
993 auto debug_info__ = debug_info ? _fbb.CreateString(debug_info) : 0;
1000 runtime_args_type__,
1008 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
1011 const ::flatbuffers::Vector<::flatbuffers::Offset<tt::target::metal::KernelDesc>> *
kernels()
const {
1012 return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<tt::target::metal::KernelDesc>> *>(VT_KERNELS);
1014 bool Verify(::flatbuffers::Verifier &verifier)
const {
1015 return VerifyTableStart(verifier) &&
1016 VerifyOffset(verifier, VT_KERNELS) &&
1017 verifier.VerifyVector(kernels()) &&
1018 verifier.VerifyVectorOfTables(kernels()) &&
1019 verifier.EndTable();
1025 ::flatbuffers::FlatBufferBuilder &
fbb_;
1027 void add_kernels(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<tt::target::metal::KernelDesc>>> kernels) {
1028 fbb_.AddOffset(ProgramDesc::VT_KERNELS, kernels);
1034 ::flatbuffers::Offset<ProgramDesc>
Finish() {
1036 auto o = ::flatbuffers::Offset<ProgramDesc>(end);
1042 ::flatbuffers::FlatBufferBuilder &_fbb,
1043 ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<tt::target::metal::KernelDesc>>> kernels = 0) {
1046 return builder_.
Finish();
1055 ::flatbuffers::FlatBufferBuilder &_fbb,
1056 const std::vector<::flatbuffers::Offset<tt::target::metal::KernelDesc>> *kernels =
nullptr) {
1057 auto kernels__ = kernels ? _fbb.CreateVector<::flatbuffers::Offset<tt::target::metal::KernelDesc>>(*kernels) : 0;
1069 auto ptr =
reinterpret_cast<const tt::target::metal::NocConfig *
>(obj);
1070 return verifier.VerifyTable(ptr);
1073 auto ptr =
reinterpret_cast<const tt::target::metal::TensixConfig *
>(obj);
1074 return verifier.VerifyTable(ptr);
1077 auto ptr =
reinterpret_cast<const tt::target::metal::EthernetConfig *
>(obj);
1078 return verifier.VerifyTable(ptr);
1080 default:
return true;
1084 inline bool VerifyKernelConfigVector(::flatbuffers::Verifier &verifier, const ::flatbuffers::Vector<::flatbuffers::Offset<void>> *values, const ::flatbuffers::Vector<KernelConfig> *types) {
1085 if (!values || !types)
return !values && !types;
1086 if (values->size() != types->size())
return false;
1087 for (::flatbuffers::uoffset_t i = 0; i < values->size(); ++i) {
1089 verifier, values->Get(i), types->GetEnum<
KernelConfig>(i))) {
1102 auto ptr =
reinterpret_cast<const tt::target::metal::KernelSource *
>(obj);
1103 return verifier.VerifyTable(ptr);
1106 auto ptr =
reinterpret_cast<const tt::target::metal::KernelBinary *
>(obj);
1107 return verifier.VerifyTable(ptr);
1109 default:
return true;
1113 inline bool VerifyKernelVector(::flatbuffers::Verifier &verifier, const ::flatbuffers::Vector<::flatbuffers::Offset<void>> *values, const ::flatbuffers::Vector<Kernel> *types) {
1114 if (!values || !types)
return !values && !types;
1115 if (values->size() != types->size())
return false;
1116 for (::flatbuffers::uoffset_t i = 0; i < values->size(); ++i) {
1118 verifier, values->Get(i), types->GetEnum<
Kernel>(i))) {
1131 auto ptr =
reinterpret_cast<const tt::target::metal::RuntimeArgTensorAddress *
>(obj);
1132 return verifier.VerifyTable(ptr);
1135 auto ptr =
reinterpret_cast<const tt::target::metal::RuntimeArgSemaphoreAddress *
>(obj);
1136 return verifier.VerifyTable(ptr);
1138 default:
return true;
1142 inline bool VerifyRuntimeArgVector(::flatbuffers::Verifier &verifier, const ::flatbuffers::Vector<::flatbuffers::Offset<void>> *values, const ::flatbuffers::Vector<RuntimeArg> *types) {
1143 if (!values || !types)
return !values && !types;
1144 if (values->size() != types->size())
return false;
1145 for (::flatbuffers::uoffset_t i = 0; i < values->size(); ++i) {
1147 verifier, values->Get(i), types->GetEnum<
RuntimeArg>(i))) {
MathFidelity
Definition: types_generated.h:489
Definition: debug_info_generated.h:18
Definition: debug_info_generated.h:36