TT-MLIR
program_generated.h
Go to the documentation of this file.
1 // automatically generated by the FlatBuffers compiler, do not modify
2 
3 
4 #ifndef FLATBUFFERS_GENERATED_PROGRAM_TT_TARGET_METAL_H_
5 #define FLATBUFFERS_GENERATED_PROGRAM_TT_TARGET_METAL_H_
6 
7 #include "flatbuffers/flatbuffers.h"
8 
9 // Ensure the included flatbuffers.h is the same version as when this file was
10 // generated, otherwise it may not be compatible.
11 static_assert(FLATBUFFERS_VERSION_MAJOR == 24 &&
12  FLATBUFFERS_VERSION_MINOR == 3 &&
13  FLATBUFFERS_VERSION_REVISION == 25,
14  "Non-compatible flatbuffers version included");
15 
16 #include "types_generated.h"
17 
18 namespace tt {
19 namespace target {
20 namespace metal {
21 
22 struct NocConfig;
23 struct NocConfigBuilder;
24 
25 struct TensixConfig;
26 struct TensixConfigBuilder;
27 
28 struct EthernetConfig;
29 struct EthernetConfigBuilder;
30 
31 struct KernelSource;
32 struct KernelSourceBuilder;
33 
34 struct KernelBinary;
35 struct KernelBinaryBuilder;
36 
38 struct RuntimeArgTensorAddressBuilder;
39 
41 struct RuntimeArgSemaphoreAddressBuilder;
42 
43 struct KernelDesc;
44 struct KernelDescBuilder;
45 
46 struct ProgramDesc;
47 struct ProgramDescBuilder;
48 
49 enum class NocIndex : uint16_t {
50  Noc0 = 0,
51  Noc1 = 1,
52  MIN = Noc0,
53  MAX = Noc1
54 };
55 
56 inline const NocIndex (&EnumValuesNocIndex())[2] {
57  static const NocIndex values[] = {
60  };
61  return values;
62 }
63 
64 inline const char * const *EnumNamesNocIndex() {
65  static const char * const names[3] = {
66  "Noc0",
67  "Noc1",
68  nullptr
69  };
70  return names;
71 }
72 
73 inline const char *EnumNameNocIndex(NocIndex e) {
74  if (::flatbuffers::IsOutRange(e, NocIndex::Noc0, NocIndex::Noc1)) return "";
75  const size_t index = static_cast<size_t>(e);
76  return EnumNamesNocIndex()[index];
77 }
78 
79 enum class EthType : uint16_t {
80  Sender = 0,
81  Receiver = 1,
82  MIN = Sender,
83  MAX = Receiver
84 };
85 
86 inline const EthType (&EnumValuesEthType())[2] {
87  static const EthType values[] = {
90  };
91  return values;
92 }
93 
94 inline const char * const *EnumNamesEthType() {
95  static const char * const names[3] = {
96  "Sender",
97  "Receiver",
98  nullptr
99  };
100  return names;
101 }
102 
103 inline const char *EnumNameEthType(EthType e) {
104  if (::flatbuffers::IsOutRange(e, EthType::Sender, EthType::Receiver)) return "";
105  const size_t index = static_cast<size_t>(e);
106  return EnumNamesEthType()[index];
107 }
108 
109 enum class UnpackToDestMode : uint8_t {
110  UnpackToDestFp32 = 0,
111  Default = 1,
113  MAX = Default
114 };
115 
117  static const UnpackToDestMode values[] = {
120  };
121  return values;
122 }
123 
124 inline const char * const *EnumNamesUnpackToDestMode() {
125  static const char * const names[3] = {
126  "UnpackToDestFp32",
127  "Default",
128  nullptr
129  };
130  return names;
131 }
132 
134  if (::flatbuffers::IsOutRange(e, UnpackToDestMode::UnpackToDestFp32, UnpackToDestMode::Default)) return "";
135  const size_t index = static_cast<size_t>(e);
136  return EnumNamesUnpackToDestMode()[index];
137 }
138 
139 enum class KernelConfig : uint8_t {
140  NONE = 0,
141  NocConfig = 1,
142  TensixConfig = 2,
143  EthernetConfig = 3,
144  MIN = NONE,
146 };
147 
148 inline const KernelConfig (&EnumValuesKernelConfig())[4] {
149  static const KernelConfig values[] = {
154  };
155  return values;
156 }
157 
158 inline const char * const *EnumNamesKernelConfig() {
159  static const char * const names[5] = {
160  "NONE",
161  "NocConfig",
162  "TensixConfig",
163  "EthernetConfig",
164  nullptr
165  };
166  return names;
167 }
168 
169 inline const char *EnumNameKernelConfig(KernelConfig e) {
170  if (::flatbuffers::IsOutRange(e, KernelConfig::NONE, KernelConfig::EthernetConfig)) return "";
171  const size_t index = static_cast<size_t>(e);
172  return EnumNamesKernelConfig()[index];
173 }
174 
175 template<typename T> struct KernelConfigTraits {
177 };
178 
179 template<> struct KernelConfigTraits<tt::target::metal::NocConfig> {
181 };
182 
183 template<> struct KernelConfigTraits<tt::target::metal::TensixConfig> {
185 };
186 
187 template<> struct KernelConfigTraits<tt::target::metal::EthernetConfig> {
189 };
190 
191 bool VerifyKernelConfig(::flatbuffers::Verifier &verifier, const void *obj, KernelConfig type);
192 bool VerifyKernelConfigVector(::flatbuffers::Verifier &verifier, const ::flatbuffers::Vector<::flatbuffers::Offset<void>> *values, const ::flatbuffers::Vector<KernelConfig> *types);
193 
194 enum class BinaryType : uint16_t {
195  BRISC = 0,
196  NCRISC = 1,
197  TRISC0 = 2,
198  TRISC1 = 3,
199  TRISC2 = 4,
200  ERISC = 5,
201  MIN = BRISC,
202  MAX = ERISC
203 };
204 
205 inline const BinaryType (&EnumValuesBinaryType())[6] {
206  static const BinaryType values[] = {
213  };
214  return values;
215 }
216 
217 inline const char * const *EnumNamesBinaryType() {
218  static const char * const names[7] = {
219  "BRISC",
220  "NCRISC",
221  "TRISC0",
222  "TRISC1",
223  "TRISC2",
224  "ERISC",
225  nullptr
226  };
227  return names;
228 }
229 
230 inline const char *EnumNameBinaryType(BinaryType e) {
231  if (::flatbuffers::IsOutRange(e, BinaryType::BRISC, BinaryType::ERISC)) return "";
232  const size_t index = static_cast<size_t>(e);
233  return EnumNamesBinaryType()[index];
234 }
235 
236 enum class CoreType : uint16_t {
237  WORKER = 0,
238  ETH = 1,
239  MIN = WORKER,
240  MAX = ETH
241 };
242 
243 inline const CoreType (&EnumValuesCoreType())[2] {
244  static const CoreType values[] = {
247  };
248  return values;
249 }
250 
251 inline const char * const *EnumNamesCoreType() {
252  static const char * const names[3] = {
253  "WORKER",
254  "ETH",
255  nullptr
256  };
257  return names;
258 }
259 
260 inline const char *EnumNameCoreType(CoreType e) {
261  if (::flatbuffers::IsOutRange(e, CoreType::WORKER, CoreType::ETH)) return "";
262  const size_t index = static_cast<size_t>(e);
263  return EnumNamesCoreType()[index];
264 }
265 
266 enum class Kernel : uint8_t {
267  NONE = 0,
268  KernelSource = 1,
269  KernelBinary = 2,
270  MIN = NONE,
271  MAX = KernelBinary
272 };
273 
274 inline const Kernel (&EnumValuesKernel())[3] {
275  static const Kernel values[] = {
276  Kernel::NONE,
279  };
280  return values;
281 }
282 
283 inline const char * const *EnumNamesKernel() {
284  static const char * const names[4] = {
285  "NONE",
286  "KernelSource",
287  "KernelBinary",
288  nullptr
289  };
290  return names;
291 }
292 
293 inline const char *EnumNameKernel(Kernel e) {
294  if (::flatbuffers::IsOutRange(e, Kernel::NONE, Kernel::KernelBinary)) return "";
295  const size_t index = static_cast<size_t>(e);
296  return EnumNamesKernel()[index];
297 }
298 
299 template<typename T> struct KernelTraits {
301 };
302 
303 template<> struct KernelTraits<tt::target::metal::KernelSource> {
305 };
306 
307 template<> struct KernelTraits<tt::target::metal::KernelBinary> {
309 };
310 
311 bool VerifyKernel(::flatbuffers::Verifier &verifier, const void *obj, Kernel type);
312 bool VerifyKernelVector(::flatbuffers::Verifier &verifier, const ::flatbuffers::Vector<::flatbuffers::Offset<void>> *values, const ::flatbuffers::Vector<Kernel> *types);
313 
314 enum class RuntimeArg : uint8_t {
315  NONE = 0,
318  MIN = NONE,
320 };
321 
322 inline const RuntimeArg (&EnumValuesRuntimeArg())[3] {
323  static const RuntimeArg values[] = {
327  };
328  return values;
329 }
330 
331 inline const char * const *EnumNamesRuntimeArg() {
332  static const char * const names[4] = {
333  "NONE",
334  "RuntimeArgTensorAddress",
335  "RuntimeArgSemaphoreAddress",
336  nullptr
337  };
338  return names;
339 }
340 
341 inline const char *EnumNameRuntimeArg(RuntimeArg e) {
342  if (::flatbuffers::IsOutRange(e, RuntimeArg::NONE, RuntimeArg::RuntimeArgSemaphoreAddress)) return "";
343  const size_t index = static_cast<size_t>(e);
344  return EnumNamesRuntimeArg()[index];
345 }
346 
347 template<typename T> struct RuntimeArgTraits {
349 };
350 
351 template<> struct RuntimeArgTraits<tt::target::metal::RuntimeArgTensorAddress> {
353 };
354 
355 template<> struct RuntimeArgTraits<tt::target::metal::RuntimeArgSemaphoreAddress> {
357 };
358 
359 bool VerifyRuntimeArg(::flatbuffers::Verifier &verifier, const void *obj, RuntimeArg type);
360 bool VerifyRuntimeArgVector(::flatbuffers::Verifier &verifier, const ::flatbuffers::Vector<::flatbuffers::Offset<void>> *values, const ::flatbuffers::Vector<RuntimeArg> *types);
361 
362 struct NocConfig FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
364  struct Traits;
365  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
366  VT_NOC_INDEX = 4
367  };
369  return static_cast<tt::target::metal::NocIndex>(GetField<uint16_t>(VT_NOC_INDEX, 0));
370  }
371  bool Verify(::flatbuffers::Verifier &verifier) const {
372  return VerifyTableStart(verifier) &&
373  VerifyField<uint16_t>(verifier, VT_NOC_INDEX, 2) &&
374  verifier.EndTable();
375  }
376 };
377 
379  typedef NocConfig Table;
380  ::flatbuffers::FlatBufferBuilder &fbb_;
381  ::flatbuffers::uoffset_t start_;
383  fbb_.AddElement<uint16_t>(NocConfig::VT_NOC_INDEX, static_cast<uint16_t>(noc_index), 0);
384  }
385  explicit NocConfigBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
386  : fbb_(_fbb) {
387  start_ = fbb_.StartTable();
388  }
389  ::flatbuffers::Offset<NocConfig> Finish() {
390  const auto end = fbb_.EndTable(start_);
391  auto o = ::flatbuffers::Offset<NocConfig>(end);
392  return o;
393  }
394 };
395 
396 inline ::flatbuffers::Offset<NocConfig> CreateNocConfig(
397  ::flatbuffers::FlatBufferBuilder &_fbb,
399  NocConfigBuilder builder_(_fbb);
400  builder_.add_noc_index(noc_index);
401  return builder_.Finish();
402 }
403 
405  using type = NocConfig;
406  static auto constexpr Create = CreateNocConfig;
407 };
408 
409 struct TensixConfig FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
411  struct Traits;
412  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
416  VT_UNPACK_TO_DEST_MODE = 10
417  };
419  return static_cast<tt::target::MathFidelity>(GetField<uint8_t>(VT_MATH_FIDELITY, 0));
420  }
421  bool fp32_dest_acc_en() const {
422  return GetField<uint8_t>(VT_FP32_DEST_ACC_EN, 0) != 0;
423  }
424  bool math_approx_mode() const {
425  return GetField<uint8_t>(VT_MATH_APPROX_MODE, 0) != 0;
426  }
427  const ::flatbuffers::Vector<tt::target::metal::UnpackToDestMode> *unpack_to_dest_mode() const {
428  return GetPointer<const ::flatbuffers::Vector<tt::target::metal::UnpackToDestMode> *>(VT_UNPACK_TO_DEST_MODE);
429  }
430  bool Verify(::flatbuffers::Verifier &verifier) const {
431  return VerifyTableStart(verifier) &&
432  VerifyField<uint8_t>(verifier, VT_MATH_FIDELITY, 1) &&
433  VerifyField<uint8_t>(verifier, VT_FP32_DEST_ACC_EN, 1) &&
434  VerifyField<uint8_t>(verifier, VT_MATH_APPROX_MODE, 1) &&
435  VerifyOffset(verifier, VT_UNPACK_TO_DEST_MODE) &&
436  verifier.VerifyVector(unpack_to_dest_mode()) &&
437  verifier.EndTable();
438  }
439 };
440 
443  ::flatbuffers::FlatBufferBuilder &fbb_;
444  ::flatbuffers::uoffset_t start_;
446  fbb_.AddElement<uint8_t>(TensixConfig::VT_MATH_FIDELITY, static_cast<uint8_t>(math_fidelity), 0);
447  }
448  void add_fp32_dest_acc_en(bool fp32_dest_acc_en) {
449  fbb_.AddElement<uint8_t>(TensixConfig::VT_FP32_DEST_ACC_EN, static_cast<uint8_t>(fp32_dest_acc_en), 0);
450  }
451  void add_math_approx_mode(bool math_approx_mode) {
452  fbb_.AddElement<uint8_t>(TensixConfig::VT_MATH_APPROX_MODE, static_cast<uint8_t>(math_approx_mode), 0);
453  }
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);
456  }
457  explicit TensixConfigBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
458  : fbb_(_fbb) {
459  start_ = fbb_.StartTable();
460  }
461  ::flatbuffers::Offset<TensixConfig> Finish() {
462  const auto end = fbb_.EndTable(start_);
463  auto o = ::flatbuffers::Offset<TensixConfig>(end);
464  return o;
465  }
466 };
467 
468 inline ::flatbuffers::Offset<TensixConfig> CreateTensixConfig(
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) {
474  TensixConfigBuilder builder_(_fbb);
475  builder_.add_unpack_to_dest_mode(unpack_to_dest_mode);
476  builder_.add_math_approx_mode(math_approx_mode);
477  builder_.add_fp32_dest_acc_en(fp32_dest_acc_en);
478  builder_.add_math_fidelity(math_fidelity);
479  return builder_.Finish();
480 }
481 
484  static auto constexpr Create = CreateTensixConfig;
485 };
486 
487 inline ::flatbuffers::Offset<TensixConfig> CreateTensixConfigDirect(
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) {
493  auto unpack_to_dest_mode__ = unpack_to_dest_mode ? _fbb.CreateVector<tt::target::metal::UnpackToDestMode>(*unpack_to_dest_mode) : 0;
495  _fbb,
496  math_fidelity,
497  fp32_dest_acc_en,
498  math_approx_mode,
499  unpack_to_dest_mode__);
500 }
501 
502 struct EthernetConfig FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
504  struct Traits;
505  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
507  VT_NOC_INDEX = 6
508  };
510  return static_cast<tt::target::metal::EthType>(GetField<uint16_t>(VT_ETH_TYPE, 0));
511  }
513  return static_cast<tt::target::metal::NocIndex>(GetField<uint16_t>(VT_NOC_INDEX, 0));
514  }
515  bool Verify(::flatbuffers::Verifier &verifier) const {
516  return VerifyTableStart(verifier) &&
517  VerifyField<uint16_t>(verifier, VT_ETH_TYPE, 2) &&
518  VerifyField<uint16_t>(verifier, VT_NOC_INDEX, 2) &&
519  verifier.EndTable();
520  }
521 };
522 
525  ::flatbuffers::FlatBufferBuilder &fbb_;
526  ::flatbuffers::uoffset_t start_;
528  fbb_.AddElement<uint16_t>(EthernetConfig::VT_ETH_TYPE, static_cast<uint16_t>(eth_type), 0);
529  }
531  fbb_.AddElement<uint16_t>(EthernetConfig::VT_NOC_INDEX, static_cast<uint16_t>(noc_index), 0);
532  }
533  explicit EthernetConfigBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
534  : fbb_(_fbb) {
535  start_ = fbb_.StartTable();
536  }
537  ::flatbuffers::Offset<EthernetConfig> Finish() {
538  const auto end = fbb_.EndTable(start_);
539  auto o = ::flatbuffers::Offset<EthernetConfig>(end);
540  return o;
541  }
542 };
543 
544 inline ::flatbuffers::Offset<EthernetConfig> CreateEthernetConfig(
545  ::flatbuffers::FlatBufferBuilder &_fbb,
548  EthernetConfigBuilder builder_(_fbb);
549  builder_.add_noc_index(noc_index);
550  builder_.add_eth_type(eth_type);
551  return builder_.Finish();
552 }
553 
556  static auto constexpr Create = CreateEthernetConfig;
557 };
558 
559 struct KernelSource FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
561  struct Traits;
562  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
565  VT_CONFIG = 8
566  };
567  const ::flatbuffers::String *source() const {
568  return GetPointer<const ::flatbuffers::String *>(VT_SOURCE);
569  }
571  return static_cast<tt::target::metal::KernelConfig>(GetField<uint8_t>(VT_CONFIG_TYPE, 0));
572  }
573  const void *config() const {
574  return GetPointer<const void *>(VT_CONFIG);
575  }
576  template<typename T> const T *config_as() const;
577  const tt::target::metal::NocConfig *config_as_NocConfig() const {
578  return config_type() == tt::target::metal::KernelConfig::NocConfig ? static_cast<const tt::target::metal::NocConfig *>(config()) : nullptr;
579  }
580  const tt::target::metal::TensixConfig *config_as_TensixConfig() const {
581  return config_type() == tt::target::metal::KernelConfig::TensixConfig ? static_cast<const tt::target::metal::TensixConfig *>(config()) : nullptr;
582  }
583  const tt::target::metal::EthernetConfig *config_as_EthernetConfig() const {
584  return config_type() == tt::target::metal::KernelConfig::EthernetConfig ? static_cast<const tt::target::metal::EthernetConfig *>(config()) : nullptr;
585  }
586  bool Verify(::flatbuffers::Verifier &verifier) const {
587  return VerifyTableStart(verifier) &&
588  VerifyOffset(verifier, VT_SOURCE) &&
589  verifier.VerifyString(source()) &&
590  VerifyField<uint8_t>(verifier, VT_CONFIG_TYPE, 1) &&
591  VerifyOffset(verifier, VT_CONFIG) &&
592  VerifyKernelConfig(verifier, config(), config_type()) &&
593  verifier.EndTable();
594  }
595 };
596 
597 template<> inline const tt::target::metal::NocConfig *KernelSource::config_as<tt::target::metal::NocConfig>() const {
598  return config_as_NocConfig();
599 }
600 
601 template<> inline const tt::target::metal::TensixConfig *KernelSource::config_as<tt::target::metal::TensixConfig>() const {
602  return config_as_TensixConfig();
603 }
604 
605 template<> inline const tt::target::metal::EthernetConfig *KernelSource::config_as<tt::target::metal::EthernetConfig>() const {
606  return config_as_EthernetConfig();
607 }
608 
611  ::flatbuffers::FlatBufferBuilder &fbb_;
612  ::flatbuffers::uoffset_t start_;
613  void add_source(::flatbuffers::Offset<::flatbuffers::String> source) {
614  fbb_.AddOffset(KernelSource::VT_SOURCE, source);
615  }
617  fbb_.AddElement<uint8_t>(KernelSource::VT_CONFIG_TYPE, static_cast<uint8_t>(config_type), 0);
618  }
619  void add_config(::flatbuffers::Offset<void> config) {
620  fbb_.AddOffset(KernelSource::VT_CONFIG, config);
621  }
622  explicit KernelSourceBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
623  : fbb_(_fbb) {
624  start_ = fbb_.StartTable();
625  }
626  ::flatbuffers::Offset<KernelSource> Finish() {
627  const auto end = fbb_.EndTable(start_);
628  auto o = ::flatbuffers::Offset<KernelSource>(end);
629  return o;
630  }
631 };
632 
633 inline ::flatbuffers::Offset<KernelSource> CreateKernelSource(
634  ::flatbuffers::FlatBufferBuilder &_fbb,
635  ::flatbuffers::Offset<::flatbuffers::String> source = 0,
637  ::flatbuffers::Offset<void> config = 0) {
638  KernelSourceBuilder builder_(_fbb);
639  builder_.add_config(config);
640  builder_.add_source(source);
641  builder_.add_config_type(config_type);
642  return builder_.Finish();
643 }
644 
647  static auto constexpr Create = CreateKernelSource;
648 };
649 
650 inline ::flatbuffers::Offset<KernelSource> CreateKernelSourceDirect(
651  ::flatbuffers::FlatBufferBuilder &_fbb,
652  const char *source = nullptr,
654  ::flatbuffers::Offset<void> config = 0) {
655  auto source__ = source ? _fbb.CreateString(source) : 0;
657  _fbb,
658  source__,
659  config_type,
660  config);
661 }
662 
663 struct KernelBinary FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
665  struct Traits;
666  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
668  VT_DATA = 6,
669  VT_DEBUG_SOURCE = 8
670  };
672  return static_cast<tt::target::metal::BinaryType>(GetField<uint16_t>(VT_CORE_TYPE, 0));
673  }
674  const ::flatbuffers::Vector<uint8_t> *data() const {
675  return GetPointer<const ::flatbuffers::Vector<uint8_t> *>(VT_DATA);
676  }
677  const ::flatbuffers::String *debug_source() const {
678  return GetPointer<const ::flatbuffers::String *>(VT_DEBUG_SOURCE);
679  }
680  bool Verify(::flatbuffers::Verifier &verifier) const {
681  return VerifyTableStart(verifier) &&
682  VerifyField<uint16_t>(verifier, VT_CORE_TYPE, 2) &&
683  VerifyOffset(verifier, VT_DATA) &&
684  verifier.VerifyVector(data()) &&
685  VerifyOffset(verifier, VT_DEBUG_SOURCE) &&
686  verifier.VerifyString(debug_source()) &&
687  verifier.EndTable();
688  }
689 };
690 
693  ::flatbuffers::FlatBufferBuilder &fbb_;
694  ::flatbuffers::uoffset_t start_;
696  fbb_.AddElement<uint16_t>(KernelBinary::VT_CORE_TYPE, static_cast<uint16_t>(core_type), 0);
697  }
698  void add_data(::flatbuffers::Offset<::flatbuffers::Vector<uint8_t>> data) {
699  fbb_.AddOffset(KernelBinary::VT_DATA, data);
700  }
701  void add_debug_source(::flatbuffers::Offset<::flatbuffers::String> debug_source) {
702  fbb_.AddOffset(KernelBinary::VT_DEBUG_SOURCE, debug_source);
703  }
704  explicit KernelBinaryBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
705  : fbb_(_fbb) {
706  start_ = fbb_.StartTable();
707  }
708  ::flatbuffers::Offset<KernelBinary> Finish() {
709  const auto end = fbb_.EndTable(start_);
710  auto o = ::flatbuffers::Offset<KernelBinary>(end);
711  return o;
712  }
713 };
714 
715 inline ::flatbuffers::Offset<KernelBinary> CreateKernelBinary(
716  ::flatbuffers::FlatBufferBuilder &_fbb,
718  ::flatbuffers::Offset<::flatbuffers::Vector<uint8_t>> data = 0,
719  ::flatbuffers::Offset<::flatbuffers::String> debug_source = 0) {
720  KernelBinaryBuilder builder_(_fbb);
721  builder_.add_debug_source(debug_source);
722  builder_.add_data(data);
723  builder_.add_core_type(core_type);
724  return builder_.Finish();
725 }
726 
729  static auto constexpr Create = CreateKernelBinary;
730 };
731 
732 inline ::flatbuffers::Offset<KernelBinary> CreateKernelBinaryDirect(
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;
740  _fbb,
741  core_type,
742  data__,
743  debug_source__);
744 }
745 
746 struct RuntimeArgTensorAddress FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
748  struct Traits;
749  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
750  VT_OPERAND_IDX = 4
751  };
752  uint32_t operand_idx() const {
753  return GetField<uint32_t>(VT_OPERAND_IDX, 0);
754  }
755  bool Verify(::flatbuffers::Verifier &verifier) const {
756  return VerifyTableStart(verifier) &&
757  VerifyField<uint32_t>(verifier, VT_OPERAND_IDX, 4) &&
758  verifier.EndTable();
759  }
760 };
761 
764  ::flatbuffers::FlatBufferBuilder &fbb_;
765  ::flatbuffers::uoffset_t start_;
766  void add_operand_idx(uint32_t operand_idx) {
767  fbb_.AddElement<uint32_t>(RuntimeArgTensorAddress::VT_OPERAND_IDX, operand_idx, 0);
768  }
769  explicit RuntimeArgTensorAddressBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
770  : fbb_(_fbb) {
771  start_ = fbb_.StartTable();
772  }
773  ::flatbuffers::Offset<RuntimeArgTensorAddress> Finish() {
774  const auto end = fbb_.EndTable(start_);
775  auto o = ::flatbuffers::Offset<RuntimeArgTensorAddress>(end);
776  return o;
777  }
778 };
779 
780 inline ::flatbuffers::Offset<RuntimeArgTensorAddress> CreateRuntimeArgTensorAddress(
781  ::flatbuffers::FlatBufferBuilder &_fbb,
782  uint32_t operand_idx = 0) {
783  RuntimeArgTensorAddressBuilder builder_(_fbb);
784  builder_.add_operand_idx(operand_idx);
785  return builder_.Finish();
786 }
787 
790  static auto constexpr Create = CreateRuntimeArgTensorAddress;
791 };
792 
793 struct RuntimeArgSemaphoreAddress FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
795  struct Traits;
796  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
798  VT_CORE_TYPE = 6
799  };
800  uint32_t initial_value() const {
801  return GetField<uint32_t>(VT_INITIAL_VALUE, 0);
802  }
804  return static_cast<tt::target::metal::CoreType>(GetField<uint16_t>(VT_CORE_TYPE, 0));
805  }
806  bool Verify(::flatbuffers::Verifier &verifier) const {
807  return VerifyTableStart(verifier) &&
808  VerifyField<uint32_t>(verifier, VT_INITIAL_VALUE, 4) &&
809  VerifyField<uint16_t>(verifier, VT_CORE_TYPE, 2) &&
810  verifier.EndTable();
811  }
812 };
813 
816  ::flatbuffers::FlatBufferBuilder &fbb_;
817  ::flatbuffers::uoffset_t start_;
818  void add_initial_value(uint32_t initial_value) {
819  fbb_.AddElement<uint32_t>(RuntimeArgSemaphoreAddress::VT_INITIAL_VALUE, initial_value, 0);
820  }
822  fbb_.AddElement<uint16_t>(RuntimeArgSemaphoreAddress::VT_CORE_TYPE, static_cast<uint16_t>(core_type), 0);
823  }
824  explicit RuntimeArgSemaphoreAddressBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
825  : fbb_(_fbb) {
826  start_ = fbb_.StartTable();
827  }
828  ::flatbuffers::Offset<RuntimeArgSemaphoreAddress> Finish() {
829  const auto end = fbb_.EndTable(start_);
830  auto o = ::flatbuffers::Offset<RuntimeArgSemaphoreAddress>(end);
831  return o;
832  }
833 };
834 
835 inline ::flatbuffers::Offset<RuntimeArgSemaphoreAddress> CreateRuntimeArgSemaphoreAddress(
836  ::flatbuffers::FlatBufferBuilder &_fbb,
837  uint32_t initial_value = 0,
839  RuntimeArgSemaphoreAddressBuilder builder_(_fbb);
840  builder_.add_initial_value(initial_value);
841  builder_.add_core_type(core_type);
842  return builder_.Finish();
843 }
844 
847  static auto constexpr Create = CreateRuntimeArgSemaphoreAddress;
848 };
849 
850 struct KernelDesc FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
852  struct Traits;
853  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
857  VT_CBS = 10,
860  VT_DEBUG_INFO = 16
861  };
863  return static_cast<tt::target::metal::Kernel>(GetField<uint8_t>(VT_KERNEL_TYPE, 0));
864  }
865  const void *kernel() const {
866  return GetPointer<const void *>(VT_KERNEL);
867  }
868  template<typename T> const T *kernel_as() const;
869  const tt::target::metal::KernelSource *kernel_as_KernelSource() const {
870  return kernel_type() == tt::target::metal::Kernel::KernelSource ? static_cast<const tt::target::metal::KernelSource *>(kernel()) : nullptr;
871  }
872  const tt::target::metal::KernelBinary *kernel_as_KernelBinary() const {
873  return kernel_type() == tt::target::metal::Kernel::KernelBinary ? static_cast<const tt::target::metal::KernelBinary *>(kernel()) : nullptr;
874  }
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);
877  }
878  const ::flatbuffers::Vector<::flatbuffers::Offset<tt::target::CBRef>> *cbs() const {
879  return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<tt::target::CBRef>> *>(VT_CBS);
880  }
881  const ::flatbuffers::Vector<tt::target::metal::RuntimeArg> *runtime_args_type() const {
882  return GetPointer<const ::flatbuffers::Vector<tt::target::metal::RuntimeArg> *>(VT_RUNTIME_ARGS_TYPE);
883  }
884  const ::flatbuffers::Vector<::flatbuffers::Offset<void>> *runtime_args() const {
885  return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<void>> *>(VT_RUNTIME_ARGS);
886  }
887  const ::flatbuffers::String *debug_info() const {
888  return GetPointer<const ::flatbuffers::String *>(VT_DEBUG_INFO);
889  }
890  bool Verify(::flatbuffers::Verifier &verifier) const {
891  return VerifyTableStart(verifier) &&
892  VerifyField<uint8_t>(verifier, VT_KERNEL_TYPE, 1) &&
893  VerifyOffset(verifier, VT_KERNEL) &&
894  VerifyKernel(verifier, kernel(), kernel_type()) &&
895  VerifyOffset(verifier, VT_CORE_RANGE_SET) &&
896  verifier.VerifyVector(core_range_set()) &&
897  VerifyOffset(verifier, VT_CBS) &&
898  verifier.VerifyVector(cbs()) &&
899  verifier.VerifyVectorOfTables(cbs()) &&
900  VerifyOffset(verifier, VT_RUNTIME_ARGS_TYPE) &&
901  verifier.VerifyVector(runtime_args_type()) &&
902  VerifyOffset(verifier, VT_RUNTIME_ARGS) &&
903  verifier.VerifyVector(runtime_args()) &&
904  VerifyRuntimeArgVector(verifier, runtime_args(), runtime_args_type()) &&
905  VerifyOffset(verifier, VT_DEBUG_INFO) &&
906  verifier.VerifyString(debug_info()) &&
907  verifier.EndTable();
908  }
909 };
910 
911 template<> inline const tt::target::metal::KernelSource *KernelDesc::kernel_as<tt::target::metal::KernelSource>() const {
912  return kernel_as_KernelSource();
913 }
914 
915 template<> inline const tt::target::metal::KernelBinary *KernelDesc::kernel_as<tt::target::metal::KernelBinary>() const {
916  return kernel_as_KernelBinary();
917 }
918 
920  typedef KernelDesc Table;
921  ::flatbuffers::FlatBufferBuilder &fbb_;
922  ::flatbuffers::uoffset_t start_;
924  fbb_.AddElement<uint8_t>(KernelDesc::VT_KERNEL_TYPE, static_cast<uint8_t>(kernel_type), 0);
925  }
926  void add_kernel(::flatbuffers::Offset<void> kernel) {
927  fbb_.AddOffset(KernelDesc::VT_KERNEL, kernel);
928  }
929  void add_core_range_set(::flatbuffers::Offset<::flatbuffers::Vector<const tt::target::Dim2dRange *>> core_range_set) {
930  fbb_.AddOffset(KernelDesc::VT_CORE_RANGE_SET, core_range_set);
931  }
932  void add_cbs(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<tt::target::CBRef>>> cbs) {
933  fbb_.AddOffset(KernelDesc::VT_CBS, cbs);
934  }
935  void add_runtime_args_type(::flatbuffers::Offset<::flatbuffers::Vector<tt::target::metal::RuntimeArg>> runtime_args_type) {
936  fbb_.AddOffset(KernelDesc::VT_RUNTIME_ARGS_TYPE, runtime_args_type);
937  }
938  void add_runtime_args(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<void>>> runtime_args) {
939  fbb_.AddOffset(KernelDesc::VT_RUNTIME_ARGS, runtime_args);
940  }
941  void add_debug_info(::flatbuffers::Offset<::flatbuffers::String> debug_info) {
942  fbb_.AddOffset(KernelDesc::VT_DEBUG_INFO, debug_info);
943  }
944  explicit KernelDescBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
945  : fbb_(_fbb) {
946  start_ = fbb_.StartTable();
947  }
948  ::flatbuffers::Offset<KernelDesc> Finish() {
949  const auto end = fbb_.EndTable(start_);
950  auto o = ::flatbuffers::Offset<KernelDesc>(end);
951  return o;
952  }
953 };
954 
955 inline ::flatbuffers::Offset<KernelDesc> CreateKernelDesc(
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) {
964  KernelDescBuilder builder_(_fbb);
965  builder_.add_debug_info(debug_info);
966  builder_.add_runtime_args(runtime_args);
967  builder_.add_runtime_args_type(runtime_args_type);
968  builder_.add_cbs(cbs);
969  builder_.add_core_range_set(core_range_set);
970  builder_.add_kernel(kernel);
971  builder_.add_kernel_type(kernel_type);
972  return builder_.Finish();
973 }
974 
976  using type = KernelDesc;
977  static auto constexpr Create = CreateKernelDesc;
978 };
979 
980 inline ::flatbuffers::Offset<KernelDesc> CreateKernelDescDirect(
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;
991  auto runtime_args_type__ = runtime_args_type ? _fbb.CreateVector<tt::target::metal::RuntimeArg>(*runtime_args_type) : 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;
995  _fbb,
996  kernel_type,
997  kernel,
998  core_range_set__,
999  cbs__,
1000  runtime_args_type__,
1001  runtime_args__,
1002  debug_info__);
1003 }
1004 
1005 struct ProgramDesc FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
1007  struct Traits;
1008  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
1009  VT_KERNELS = 4
1010  };
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);
1013  }
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();
1020  }
1021 };
1022 
1024  typedef ProgramDesc Table;
1025  ::flatbuffers::FlatBufferBuilder &fbb_;
1026  ::flatbuffers::uoffset_t start_;
1027  void add_kernels(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<tt::target::metal::KernelDesc>>> kernels) {
1028  fbb_.AddOffset(ProgramDesc::VT_KERNELS, kernels);
1029  }
1030  explicit ProgramDescBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
1031  : fbb_(_fbb) {
1032  start_ = fbb_.StartTable();
1033  }
1034  ::flatbuffers::Offset<ProgramDesc> Finish() {
1035  const auto end = fbb_.EndTable(start_);
1036  auto o = ::flatbuffers::Offset<ProgramDesc>(end);
1037  return o;
1038  }
1039 };
1040 
1041 inline ::flatbuffers::Offset<ProgramDesc> CreateProgramDesc(
1042  ::flatbuffers::FlatBufferBuilder &_fbb,
1043  ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<tt::target::metal::KernelDesc>>> kernels = 0) {
1044  ProgramDescBuilder builder_(_fbb);
1045  builder_.add_kernels(kernels);
1046  return builder_.Finish();
1047 }
1048 
1050  using type = ProgramDesc;
1051  static auto constexpr Create = CreateProgramDesc;
1052 };
1053 
1054 inline ::flatbuffers::Offset<ProgramDesc> CreateProgramDescDirect(
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;
1059  _fbb,
1060  kernels__);
1061 }
1062 
1063 inline bool VerifyKernelConfig(::flatbuffers::Verifier &verifier, const void *obj, KernelConfig type) {
1064  switch (type) {
1065  case KernelConfig::NONE: {
1066  return true;
1067  }
1068  case KernelConfig::NocConfig: {
1069  auto ptr = reinterpret_cast<const tt::target::metal::NocConfig *>(obj);
1070  return verifier.VerifyTable(ptr);
1071  }
1073  auto ptr = reinterpret_cast<const tt::target::metal::TensixConfig *>(obj);
1074  return verifier.VerifyTable(ptr);
1075  }
1077  auto ptr = reinterpret_cast<const tt::target::metal::EthernetConfig *>(obj);
1078  return verifier.VerifyTable(ptr);
1079  }
1080  default: return true;
1081  }
1082 }
1083 
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) {
1088  if (!VerifyKernelConfig(
1089  verifier, values->Get(i), types->GetEnum<KernelConfig>(i))) {
1090  return false;
1091  }
1092  }
1093  return true;
1094 }
1095 
1096 inline bool VerifyKernel(::flatbuffers::Verifier &verifier, const void *obj, Kernel type) {
1097  switch (type) {
1098  case Kernel::NONE: {
1099  return true;
1100  }
1101  case Kernel::KernelSource: {
1102  auto ptr = reinterpret_cast<const tt::target::metal::KernelSource *>(obj);
1103  return verifier.VerifyTable(ptr);
1104  }
1105  case Kernel::KernelBinary: {
1106  auto ptr = reinterpret_cast<const tt::target::metal::KernelBinary *>(obj);
1107  return verifier.VerifyTable(ptr);
1108  }
1109  default: return true;
1110  }
1111 }
1112 
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) {
1117  if (!VerifyKernel(
1118  verifier, values->Get(i), types->GetEnum<Kernel>(i))) {
1119  return false;
1120  }
1121  }
1122  return true;
1123 }
1124 
1125 inline bool VerifyRuntimeArg(::flatbuffers::Verifier &verifier, const void *obj, RuntimeArg type) {
1126  switch (type) {
1127  case RuntimeArg::NONE: {
1128  return true;
1129  }
1131  auto ptr = reinterpret_cast<const tt::target::metal::RuntimeArgTensorAddress *>(obj);
1132  return verifier.VerifyTable(ptr);
1133  }
1135  auto ptr = reinterpret_cast<const tt::target::metal::RuntimeArgSemaphoreAddress *>(obj);
1136  return verifier.VerifyTable(ptr);
1137  }
1138  default: return true;
1139  }
1140 }
1141 
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) {
1146  if (!VerifyRuntimeArg(
1147  verifier, values->Get(i), types->GetEnum<RuntimeArg>(i))) {
1148  return false;
1149  }
1150  }
1151  return true;
1152 }
1153 
1154 } // namespace metal
1155 } // namespace target
1156 } // namespace tt
1157 
1158 #endif // FLATBUFFERS_GENERATED_PROGRAM_TT_TARGET_METAL_H_
VT_DATA
Definition: program_generated.h:668
VT_MATH_FIDELITY
Definition: program_generated.h:413
VT_CORE_TYPE
Definition: program_generated.h:667
VT_MATH_APPROX_MODE
Definition: program_generated.h:415
VT_CONFIG_TYPE
Definition: program_generated.h:564
VT_ETH_TYPE
Definition: program_generated.h:506
VT_CBS
Definition: program_generated.h:857
VT_CORE_RANGE_SET
Definition: program_generated.h:856
VT_RUNTIME_ARGS_TYPE
Definition: program_generated.h:858
VT_KERNEL
Definition: program_generated.h:855
VT_FP32_DEST_ACC_EN
Definition: program_generated.h:414
VT_RUNTIME_ARGS
Definition: program_generated.h:859
VT_SOURCE
Definition: program_generated.h:563
VT_KERNEL_TYPE
Definition: program_generated.h:854
VT_INITIAL_VALUE
Definition: program_generated.h:797
Kernel
Definition: program_generated.h:266
const char *const * EnumNamesKernel()
Definition: program_generated.h:283
const char * EnumNameNocIndex(NocIndex e)
Definition: program_generated.h:73
const char *const * EnumNamesKernelConfig()
Definition: program_generated.h:158
inline ::flatbuffers::Offset< ProgramDesc > CreateProgramDescDirect(::flatbuffers::FlatBufferBuilder &_fbb, const std::vector<::flatbuffers::Offset< tt::target::metal::KernelDesc >> *kernels=nullptr)
Definition: program_generated.h:1054
RuntimeArg
Definition: program_generated.h:314
bool VerifyKernelConfig(::flatbuffers::Verifier &verifier, const void *obj, KernelConfig type)
Definition: program_generated.h:1063
const UnpackToDestMode(& EnumValuesUnpackToDestMode())[2]
Definition: program_generated.h:116
inline ::flatbuffers::Offset< KernelBinary > CreateKernelBinary(::flatbuffers::FlatBufferBuilder &_fbb, tt::target::metal::BinaryType core_type=tt::target::metal::BinaryType::BRISC, ::flatbuffers::Offset<::flatbuffers::Vector< uint8_t >> data=0, ::flatbuffers::Offset<::flatbuffers::String > debug_source=0)
Definition: program_generated.h:715
inline ::flatbuffers::Offset< RuntimeArgSemaphoreAddress > CreateRuntimeArgSemaphoreAddress(::flatbuffers::FlatBufferBuilder &_fbb, uint32_t initial_value=0, tt::target::metal::CoreType core_type=tt::target::metal::CoreType::WORKER)
Definition: program_generated.h:835
BinaryType
Definition: program_generated.h:194
const NocIndex(& EnumValuesNocIndex())[2]
Definition: program_generated.h:56
const char *const * EnumNamesNocIndex()
Definition: program_generated.h:64
bool VerifyKernelVector(::flatbuffers::Verifier &verifier, const ::flatbuffers::Vector<::flatbuffers::Offset< void >> *values, const ::flatbuffers::Vector< Kernel > *types)
Definition: program_generated.h:1113
const char * EnumNameRuntimeArg(RuntimeArg e)
Definition: program_generated.h:341
EthType
Definition: program_generated.h:79
const char * EnumNameEthType(EthType e)
Definition: program_generated.h:103
const BinaryType(& EnumValuesBinaryType())[6]
Definition: program_generated.h:205
inline ::flatbuffers::Offset< TensixConfig > CreateTensixConfigDirect(::flatbuffers::FlatBufferBuilder &_fbb, tt::target::MathFidelity math_fidelity=tt::target::MathFidelity::LoFi, bool fp32_dest_acc_en=false, bool math_approx_mode=false, const std::vector< tt::target::metal::UnpackToDestMode > *unpack_to_dest_mode=nullptr)
Definition: program_generated.h:487
const RuntimeArg(& EnumValuesRuntimeArg())[3]
Definition: program_generated.h:322
inline ::flatbuffers::Offset< NocConfig > CreateNocConfig(::flatbuffers::FlatBufferBuilder &_fbb, tt::target::metal::NocIndex noc_index=tt::target::metal::NocIndex::Noc0)
Definition: program_generated.h:396
KernelConfig
Definition: program_generated.h:139
bool VerifyRuntimeArg(::flatbuffers::Verifier &verifier, const void *obj, RuntimeArg type)
Definition: program_generated.h:1125
const char *const * EnumNamesCoreType()
Definition: program_generated.h:251
bool VerifyKernel(::flatbuffers::Verifier &verifier, const void *obj, Kernel type)
Definition: program_generated.h:1096
const KernelConfig(& EnumValuesKernelConfig())[4]
Definition: program_generated.h:148
CoreType
Definition: program_generated.h:236
bool VerifyRuntimeArgVector(::flatbuffers::Verifier &verifier, const ::flatbuffers::Vector<::flatbuffers::Offset< void >> *values, const ::flatbuffers::Vector< RuntimeArg > *types)
Definition: program_generated.h:1142
inline ::flatbuffers::Offset< ProgramDesc > CreateProgramDesc(::flatbuffers::FlatBufferBuilder &_fbb, ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset< tt::target::metal::KernelDesc >>> kernels=0)
Definition: program_generated.h:1041
const char *const * EnumNamesUnpackToDestMode()
Definition: program_generated.h:124
const EthType(& EnumValuesEthType())[2]
Definition: program_generated.h:86
inline ::flatbuffers::Offset< KernelDesc > CreateKernelDesc(::flatbuffers::FlatBufferBuilder &_fbb, tt::target::metal::Kernel kernel_type=tt::target::metal::Kernel::NONE, ::flatbuffers::Offset< void > kernel=0, ::flatbuffers::Offset<::flatbuffers::Vector< const tt::target::Dim2dRange * >> core_range_set=0, ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset< tt::target::CBRef >>> cbs=0, ::flatbuffers::Offset<::flatbuffers::Vector< tt::target::metal::RuntimeArg >> runtime_args_type=0, ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset< void >>> runtime_args=0, ::flatbuffers::Offset<::flatbuffers::String > debug_info=0)
Definition: program_generated.h:955
const char * EnumNameCoreType(CoreType e)
Definition: program_generated.h:260
const char *const * EnumNamesBinaryType()
Definition: program_generated.h:217
const Kernel(& EnumValuesKernel())[3]
Definition: program_generated.h:274
NocIndex
Definition: program_generated.h:49
inline ::flatbuffers::Offset< KernelSource > CreateKernelSource(::flatbuffers::FlatBufferBuilder &_fbb, ::flatbuffers::Offset<::flatbuffers::String > source=0, tt::target::metal::KernelConfig config_type=tt::target::metal::KernelConfig::NONE, ::flatbuffers::Offset< void > config=0)
Definition: program_generated.h:633
inline ::flatbuffers::Offset< KernelBinary > CreateKernelBinaryDirect(::flatbuffers::FlatBufferBuilder &_fbb, tt::target::metal::BinaryType core_type=tt::target::metal::BinaryType::BRISC, const std::vector< uint8_t > *data=nullptr, const char *debug_source=nullptr)
Definition: program_generated.h:732
const char * EnumNameUnpackToDestMode(UnpackToDestMode e)
Definition: program_generated.h:133
inline ::flatbuffers::Offset< TensixConfig > CreateTensixConfig(::flatbuffers::FlatBufferBuilder &_fbb, tt::target::MathFidelity math_fidelity=tt::target::MathFidelity::LoFi, bool fp32_dest_acc_en=false, bool math_approx_mode=false, ::flatbuffers::Offset<::flatbuffers::Vector< tt::target::metal::UnpackToDestMode >> unpack_to_dest_mode=0)
Definition: program_generated.h:468
inline ::flatbuffers::Offset< EthernetConfig > CreateEthernetConfig(::flatbuffers::FlatBufferBuilder &_fbb, tt::target::metal::EthType eth_type=tt::target::metal::EthType::Sender, tt::target::metal::NocIndex noc_index=tt::target::metal::NocIndex::Noc0)
Definition: program_generated.h:544
const char *const * EnumNamesEthType()
Definition: program_generated.h:94
inline ::flatbuffers::Offset< RuntimeArgTensorAddress > CreateRuntimeArgTensorAddress(::flatbuffers::FlatBufferBuilder &_fbb, uint32_t operand_idx=0)
Definition: program_generated.h:780
bool VerifyKernelConfigVector(::flatbuffers::Verifier &verifier, const ::flatbuffers::Vector<::flatbuffers::Offset< void >> *values, const ::flatbuffers::Vector< KernelConfig > *types)
Definition: program_generated.h:1084
inline ::flatbuffers::Offset< KernelDesc > CreateKernelDescDirect(::flatbuffers::FlatBufferBuilder &_fbb, tt::target::metal::Kernel kernel_type=tt::target::metal::Kernel::NONE, ::flatbuffers::Offset< void > kernel=0, const std::vector< tt::target::Dim2dRange > *core_range_set=nullptr, const std::vector<::flatbuffers::Offset< tt::target::CBRef >> *cbs=nullptr, const std::vector< tt::target::metal::RuntimeArg > *runtime_args_type=nullptr, const std::vector<::flatbuffers::Offset< void >> *runtime_args=nullptr, const char *debug_info=nullptr)
Definition: program_generated.h:980
const char * EnumNameKernel(Kernel e)
Definition: program_generated.h:293
const CoreType(& EnumValuesCoreType())[2]
Definition: program_generated.h:243
const char * EnumNameBinaryType(BinaryType e)
Definition: program_generated.h:230
inline ::flatbuffers::Offset< KernelSource > CreateKernelSourceDirect(::flatbuffers::FlatBufferBuilder &_fbb, const char *source=nullptr, tt::target::metal::KernelConfig config_type=tt::target::metal::KernelConfig::NONE, ::flatbuffers::Offset< void > config=0)
Definition: program_generated.h:650
const char * EnumNameKernelConfig(KernelConfig e)
Definition: program_generated.h:169
UnpackToDestMode
Definition: program_generated.h:109
const char *const * EnumNamesRuntimeArg()
Definition: program_generated.h:331
MathFidelity
Definition: types_generated.h:489
Definition: debug_info_generated.h:18
Definition: debug_info_generated.h:36
Definition: program_generated.h:523
::flatbuffers::uoffset_t start_
Definition: program_generated.h:526
::flatbuffers::FlatBufferBuilder & fbb_
Definition: program_generated.h:525
::flatbuffers::Offset< EthernetConfig > Finish()
Definition: program_generated.h:537
void add_eth_type(tt::target::metal::EthType eth_type)
Definition: program_generated.h:527
void add_noc_index(tt::target::metal::NocIndex noc_index)
Definition: program_generated.h:530
EthernetConfigBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
Definition: program_generated.h:533
EthernetConfig Table
Definition: program_generated.h:524
Definition: program_generated.h:554
static constexpr auto Create
Definition: program_generated.h:556
EthernetConfig type
Definition: program_generated.h:555
Definition: binary_generated.h:37
TensixConfigBuilder Builder
Definition: program_generated.h:410
bool Verify(::flatbuffers::Verifier &verifier) const
Definition: program_generated.h:371
ProgramDescBuilder Builder
Definition: program_generated.h:1006
uint32_t operand_idx() const
Definition: program_generated.h:752
tt::target::metal::CoreType core_type() const
Definition: program_generated.h:803
const tt::target::metal::KernelSource * kernel_as_KernelSource() const
Definition: program_generated.h:869
tt::target::MathFidelity math_fidelity() const
Definition: program_generated.h:418
EthernetConfigBuilder Builder
Definition: program_generated.h:503
const ::flatbuffers::Vector< tt::target::metal::RuntimeArg > * runtime_args_type() const
Definition: program_generated.h:881
const void * config() const
Definition: program_generated.h:573
const ::flatbuffers::Vector<::flatbuffers::Offset< tt::target::metal::KernelDesc > > * kernels() const
Definition: program_generated.h:1011
const ::flatbuffers::Vector<::flatbuffers::Offset< tt::target::CBRef > > * cbs() const
Definition: program_generated.h:878
uint32_t initial_value() const
Definition: program_generated.h:800
const ::flatbuffers::String * debug_source() const
Definition: program_generated.h:677
const void * kernel() const
Definition: program_generated.h:865
bool fp32_dest_acc_en() const
Definition: program_generated.h:421
bool math_approx_mode() const
Definition: program_generated.h:424
const ::flatbuffers::Vector< const tt::target::Dim2dRange * > * core_range_set() const
Definition: program_generated.h:875
KernelBinaryBuilder Builder
Definition: program_generated.h:664
KernelSourceBuilder Builder
Definition: program_generated.h:560
const ::flatbuffers::String * debug_info() const
Definition: program_generated.h:887
const tt::target::metal::EthernetConfig * config_as_EthernetConfig() const
Definition: program_generated.h:583
const tt::target::metal::NocConfig * config_as_NocConfig() const
Definition: program_generated.h:577
const ::flatbuffers::String * source() const
Definition: program_generated.h:567
KernelDescBuilder Builder
Definition: program_generated.h:851
const tt::target::metal::TensixConfig * config_as_TensixConfig() const
Definition: program_generated.h:580
NocConfigBuilder Builder
Definition: program_generated.h:363
RuntimeArgSemaphoreAddressBuilder Builder
Definition: program_generated.h:794
tt::target::metal::KernelConfig config_type() const
Definition: program_generated.h:570
const tt::target::metal::KernelBinary * kernel_as_KernelBinary() const
Definition: program_generated.h:872
tt::target::metal::Kernel kernel_type() const
Definition: program_generated.h:862
tt::target::metal::EthType eth_type() const
Definition: program_generated.h:509
RuntimeArgTensorAddressBuilder Builder
Definition: program_generated.h:747
const ::flatbuffers::Vector< tt::target::metal::UnpackToDestMode > * unpack_to_dest_mode() const
Definition: program_generated.h:427
const ::flatbuffers::Vector<::flatbuffers::Offset< void > > * runtime_args() const
Definition: program_generated.h:884
const ::flatbuffers::Vector< uint8_t > * data() const
Definition: program_generated.h:674
tt::target::metal::NocIndex noc_index() const
Definition: program_generated.h:368
tt::target::metal::BinaryType core_type() const
Definition: program_generated.h:671
Definition: program_generated.h:691
void add_debug_source(::flatbuffers::Offset<::flatbuffers::String > debug_source)
Definition: program_generated.h:701
KernelBinaryBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
Definition: program_generated.h:704
::flatbuffers::uoffset_t start_
Definition: program_generated.h:694
::flatbuffers::FlatBufferBuilder & fbb_
Definition: program_generated.h:693
void add_core_type(tt::target::metal::BinaryType core_type)
Definition: program_generated.h:695
::flatbuffers::Offset< KernelBinary > Finish()
Definition: program_generated.h:708
KernelBinary Table
Definition: program_generated.h:692
void add_data(::flatbuffers::Offset<::flatbuffers::Vector< uint8_t >> data)
Definition: program_generated.h:698
Definition: program_generated.h:727
static constexpr auto Create
Definition: program_generated.h:729
KernelBinary type
Definition: program_generated.h:728
Definition: program_generated.h:175
static const KernelConfig enum_value
Definition: program_generated.h:176
Definition: program_generated.h:919
::flatbuffers::uoffset_t start_
Definition: program_generated.h:922
KernelDesc Table
Definition: program_generated.h:920
KernelDescBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
Definition: program_generated.h:944
void add_core_range_set(::flatbuffers::Offset<::flatbuffers::Vector< const tt::target::Dim2dRange * >> core_range_set)
Definition: program_generated.h:929
void add_runtime_args(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset< void >>> runtime_args)
Definition: program_generated.h:938
void add_kernel_type(tt::target::metal::Kernel kernel_type)
Definition: program_generated.h:923
::flatbuffers::Offset< KernelDesc > Finish()
Definition: program_generated.h:948
void add_debug_info(::flatbuffers::Offset<::flatbuffers::String > debug_info)
Definition: program_generated.h:941
void add_cbs(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset< tt::target::CBRef >>> cbs)
Definition: program_generated.h:932
::flatbuffers::FlatBufferBuilder & fbb_
Definition: program_generated.h:921
void add_kernel(::flatbuffers::Offset< void > kernel)
Definition: program_generated.h:926
void add_runtime_args_type(::flatbuffers::Offset<::flatbuffers::Vector< tt::target::metal::RuntimeArg >> runtime_args_type)
Definition: program_generated.h:935
Definition: program_generated.h:975
static constexpr auto Create
Definition: program_generated.h:977
KernelDesc type
Definition: program_generated.h:976
Definition: program_generated.h:609
void add_config_type(tt::target::metal::KernelConfig config_type)
Definition: program_generated.h:616
::flatbuffers::FlatBufferBuilder & fbb_
Definition: program_generated.h:611
::flatbuffers::uoffset_t start_
Definition: program_generated.h:612
::flatbuffers::Offset< KernelSource > Finish()
Definition: program_generated.h:626
void add_config(::flatbuffers::Offset< void > config)
Definition: program_generated.h:619
void add_source(::flatbuffers::Offset<::flatbuffers::String > source)
Definition: program_generated.h:613
KernelSourceBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
Definition: program_generated.h:622
KernelSource Table
Definition: program_generated.h:610
Definition: program_generated.h:645
static constexpr auto Create
Definition: program_generated.h:647
KernelSource type
Definition: program_generated.h:646
Definition: program_generated.h:299
static const Kernel enum_value
Definition: program_generated.h:300
Definition: program_generated.h:378
NocConfig Table
Definition: program_generated.h:379
::flatbuffers::Offset< NocConfig > Finish()
Definition: program_generated.h:389
void add_noc_index(tt::target::metal::NocIndex noc_index)
Definition: program_generated.h:382
::flatbuffers::FlatBufferBuilder & fbb_
Definition: program_generated.h:380
::flatbuffers::uoffset_t start_
Definition: program_generated.h:381
NocConfigBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
Definition: program_generated.h:385
Definition: program_generated.h:404
static constexpr auto Create
Definition: program_generated.h:406
NocConfig type
Definition: program_generated.h:405
Definition: program_generated.h:1023
::flatbuffers::FlatBufferBuilder & fbb_
Definition: program_generated.h:1025
::flatbuffers::uoffset_t start_
Definition: program_generated.h:1026
ProgramDescBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
Definition: program_generated.h:1030
::flatbuffers::Offset< ProgramDesc > Finish()
Definition: program_generated.h:1034
ProgramDesc Table
Definition: program_generated.h:1024
void add_kernels(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset< tt::target::metal::KernelDesc >>> kernels)
Definition: program_generated.h:1027
Definition: program_generated.h:1049
static constexpr auto Create
Definition: program_generated.h:1051
ProgramDesc type
Definition: program_generated.h:1050
Definition: program_generated.h:814
RuntimeArgSemaphoreAddress Table
Definition: program_generated.h:815
::flatbuffers::uoffset_t start_
Definition: program_generated.h:817
::flatbuffers::Offset< RuntimeArgSemaphoreAddress > Finish()
Definition: program_generated.h:828
void add_core_type(tt::target::metal::CoreType core_type)
Definition: program_generated.h:821
::flatbuffers::FlatBufferBuilder & fbb_
Definition: program_generated.h:816
void add_initial_value(uint32_t initial_value)
Definition: program_generated.h:818
RuntimeArgSemaphoreAddressBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
Definition: program_generated.h:824
RuntimeArgSemaphoreAddress type
Definition: program_generated.h:846
static constexpr auto Create
Definition: program_generated.h:847
Definition: program_generated.h:762
::flatbuffers::uoffset_t start_
Definition: program_generated.h:765
void add_operand_idx(uint32_t operand_idx)
Definition: program_generated.h:766
::flatbuffers::Offset< RuntimeArgTensorAddress > Finish()
Definition: program_generated.h:773
::flatbuffers::FlatBufferBuilder & fbb_
Definition: program_generated.h:764
RuntimeArgTensorAddressBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
Definition: program_generated.h:769
RuntimeArgTensorAddress Table
Definition: program_generated.h:763
Definition: program_generated.h:788
RuntimeArgTensorAddress type
Definition: program_generated.h:789
static constexpr auto Create
Definition: program_generated.h:790
Definition: program_generated.h:347
static const RuntimeArg enum_value
Definition: program_generated.h:348
Definition: program_generated.h:441
void add_math_fidelity(tt::target::MathFidelity math_fidelity)
Definition: program_generated.h:445
::flatbuffers::uoffset_t start_
Definition: program_generated.h:444
::flatbuffers::Offset< TensixConfig > Finish()
Definition: program_generated.h:461
void add_fp32_dest_acc_en(bool fp32_dest_acc_en)
Definition: program_generated.h:448
void add_math_approx_mode(bool math_approx_mode)
Definition: program_generated.h:451
void add_unpack_to_dest_mode(::flatbuffers::Offset<::flatbuffers::Vector< tt::target::metal::UnpackToDestMode >> unpack_to_dest_mode)
Definition: program_generated.h:454
TensixConfigBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
Definition: program_generated.h:457
TensixConfig Table
Definition: program_generated.h:442
::flatbuffers::FlatBufferBuilder & fbb_
Definition: program_generated.h:443
Definition: program_generated.h:482
static constexpr auto Create
Definition: program_generated.h:484
TensixConfig type
Definition: program_generated.h:483