TT-MLIR
command_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_COMMAND_TT_TARGET_METAL_H_
5 #define FLATBUFFERS_GENERATED_COMMAND_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 "program_generated.h"
17 
18 namespace tt {
19 namespace target {
20 namespace metal {
21 
23 struct EnqueueProgramCommandBuilder;
24 
25 struct ConstantBuffer8;
26 struct ConstantBuffer8Builder;
27 
28 struct ConstantBuffer16;
29 struct ConstantBuffer16Builder;
30 
31 struct ConstantBuffer32;
32 struct ConstantBuffer32Builder;
33 
35 struct EnqueueWriteBufferCommandBuilder;
36 
38 struct EnqueueReadBufferCommandBuilder;
39 
40 struct CreateBufferCommand;
41 struct CreateBufferCommandBuilder;
42 
44 struct DeallocateBufferCommandBuilder;
45 
46 struct CreateEventCommand;
47 struct CreateEventCommandBuilder;
48 
50 struct EnqueueRecordEventCommandBuilder;
51 
53 struct EnqueueWaitForEventCommandBuilder;
54 
56 struct EventSynchronizeCommandBuilder;
57 
58 struct EventQueryCommand;
59 struct EventQueryCommandBuilder;
60 
61 struct FinishCommand;
62 struct FinishCommandBuilder;
63 
64 struct Command;
65 struct CommandBuilder;
66 
67 struct CommandQueue;
68 struct CommandQueueBuilder;
69 
70 enum class HostBuffer : uint8_t {
71  NONE = 0,
72  TensorRef = 1,
73  ConstantBuffer8 = 2,
74  ConstantBuffer16 = 3,
75  ConstantBuffer32 = 4,
76  MIN = NONE,
78 };
79 
80 inline const HostBuffer (&EnumValuesHostBuffer())[5] {
81  static const HostBuffer values[] = {
87  };
88  return values;
89 }
90 
91 inline const char * const *EnumNamesHostBuffer() {
92  static const char * const names[6] = {
93  "NONE",
94  "TensorRef",
95  "ConstantBuffer8",
96  "ConstantBuffer16",
97  "ConstantBuffer32",
98  nullptr
99  };
100  return names;
101 }
102 
103 inline const char *EnumNameHostBuffer(HostBuffer e) {
104  if (::flatbuffers::IsOutRange(e, HostBuffer::NONE, HostBuffer::ConstantBuffer32)) return "";
105  const size_t index = static_cast<size_t>(e);
106  return EnumNamesHostBuffer()[index];
107 }
108 
109 template<typename T> struct HostBufferTraits {
111 };
112 
113 template<> struct HostBufferTraits<tt::target::TensorRef> {
115 };
116 
117 template<> struct HostBufferTraits<tt::target::metal::ConstantBuffer8> {
119 };
120 
121 template<> struct HostBufferTraits<tt::target::metal::ConstantBuffer16> {
123 };
124 
125 template<> struct HostBufferTraits<tt::target::metal::ConstantBuffer32> {
127 };
128 
129 bool VerifyHostBuffer(::flatbuffers::Verifier &verifier, const void *obj, HostBuffer type);
130 bool VerifyHostBufferVector(::flatbuffers::Verifier &verifier, const ::flatbuffers::Vector<::flatbuffers::Offset<void>> *values, const ::flatbuffers::Vector<HostBuffer> *types);
131 
132 enum class CommandType : uint8_t {
133  NONE = 0,
139  CreateEventCommand = 6,
143  EventQueryCommand = 10,
144  FinishCommand = 11,
145  MIN = NONE,
147 };
148 
149 inline const CommandType (&EnumValuesCommandType())[12] {
150  static const CommandType values[] = {
163  };
164  return values;
165 }
166 
167 inline const char * const *EnumNamesCommandType() {
168  static const char * const names[13] = {
169  "NONE",
170  "EnqueueProgramCommand",
171  "EnqueueWriteBufferCommand",
172  "EnqueueReadBufferCommand",
173  "CreateBufferCommand",
174  "DeallocateBufferCommand",
175  "CreateEventCommand",
176  "EnqueueRecordEventCommand",
177  "EnqueueWaitForEventCommand",
178  "EventSynchronizeCommand",
179  "EventQueryCommand",
180  "FinishCommand",
181  nullptr
182  };
183  return names;
184 }
185 
186 inline const char *EnumNameCommandType(CommandType e) {
187  if (::flatbuffers::IsOutRange(e, CommandType::NONE, CommandType::FinishCommand)) return "";
188  const size_t index = static_cast<size_t>(e);
189  return EnumNamesCommandType()[index];
190 }
191 
192 template<typename T> struct CommandTypeTraits {
194 };
195 
196 template<> struct CommandTypeTraits<tt::target::metal::EnqueueProgramCommand> {
198 };
199 
200 template<> struct CommandTypeTraits<tt::target::metal::EnqueueWriteBufferCommand> {
202 };
203 
204 template<> struct CommandTypeTraits<tt::target::metal::EnqueueReadBufferCommand> {
206 };
207 
208 template<> struct CommandTypeTraits<tt::target::metal::CreateBufferCommand> {
210 };
211 
212 template<> struct CommandTypeTraits<tt::target::metal::DeallocateBufferCommand> {
214 };
215 
216 template<> struct CommandTypeTraits<tt::target::metal::CreateEventCommand> {
218 };
219 
220 template<> struct CommandTypeTraits<tt::target::metal::EnqueueRecordEventCommand> {
222 };
223 
224 template<> struct CommandTypeTraits<tt::target::metal::EnqueueWaitForEventCommand> {
226 };
227 
228 template<> struct CommandTypeTraits<tt::target::metal::EventSynchronizeCommand> {
230 };
231 
232 template<> struct CommandTypeTraits<tt::target::metal::EventQueryCommand> {
234 };
235 
236 template<> struct CommandTypeTraits<tt::target::metal::FinishCommand> {
238 };
239 
240 bool VerifyCommandType(::flatbuffers::Verifier &verifier, const void *obj, CommandType type);
241 bool VerifyCommandTypeVector(::flatbuffers::Verifier &verifier, const ::flatbuffers::Vector<::flatbuffers::Offset<void>> *values, const ::flatbuffers::Vector<CommandType> *types);
242 
243 struct EnqueueProgramCommand FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
245  struct Traits;
246  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
248  VT_PROGRAM = 6
249  };
250  const ::flatbuffers::Vector<::flatbuffers::Offset<tt::target::TensorRef>> *operands() const {
251  return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<tt::target::TensorRef>> *>(VT_OPERANDS);
252  }
253  const tt::target::metal::ProgramDesc *program() const {
254  return GetPointer<const tt::target::metal::ProgramDesc *>(VT_PROGRAM);
255  }
256  bool Verify(::flatbuffers::Verifier &verifier) const {
257  return VerifyTableStart(verifier) &&
258  VerifyOffset(verifier, VT_OPERANDS) &&
259  verifier.VerifyVector(operands()) &&
260  verifier.VerifyVectorOfTables(operands()) &&
261  VerifyOffset(verifier, VT_PROGRAM) &&
262  verifier.VerifyTable(program()) &&
263  verifier.EndTable();
264  }
265 };
266 
269  ::flatbuffers::FlatBufferBuilder &fbb_;
270  ::flatbuffers::uoffset_t start_;
271  void add_operands(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<tt::target::TensorRef>>> operands) {
272  fbb_.AddOffset(EnqueueProgramCommand::VT_OPERANDS, operands);
273  }
274  void add_program(::flatbuffers::Offset<tt::target::metal::ProgramDesc> program) {
275  fbb_.AddOffset(EnqueueProgramCommand::VT_PROGRAM, program);
276  }
277  explicit EnqueueProgramCommandBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
278  : fbb_(_fbb) {
279  start_ = fbb_.StartTable();
280  }
281  ::flatbuffers::Offset<EnqueueProgramCommand> Finish() {
282  const auto end = fbb_.EndTable(start_);
283  auto o = ::flatbuffers::Offset<EnqueueProgramCommand>(end);
284  return o;
285  }
286 };
287 
288 inline ::flatbuffers::Offset<EnqueueProgramCommand> CreateEnqueueProgramCommand(
289  ::flatbuffers::FlatBufferBuilder &_fbb,
290  ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<tt::target::TensorRef>>> operands = 0,
291  ::flatbuffers::Offset<tt::target::metal::ProgramDesc> program = 0) {
292  EnqueueProgramCommandBuilder builder_(_fbb);
293  builder_.add_program(program);
294  builder_.add_operands(operands);
295  return builder_.Finish();
296 }
297 
300  static auto constexpr Create = CreateEnqueueProgramCommand;
301 };
302 
303 inline ::flatbuffers::Offset<EnqueueProgramCommand> CreateEnqueueProgramCommandDirect(
304  ::flatbuffers::FlatBufferBuilder &_fbb,
305  const std::vector<::flatbuffers::Offset<tt::target::TensorRef>> *operands = nullptr,
306  ::flatbuffers::Offset<tt::target::metal::ProgramDesc> program = 0) {
307  auto operands__ = operands ? _fbb.CreateVector<::flatbuffers::Offset<tt::target::TensorRef>>(*operands) : 0;
309  _fbb,
310  operands__,
311  program);
312 }
313 
314 struct ConstantBuffer8 FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
316  struct Traits;
317  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
318  VT_DATA = 4
319  };
320  const ::flatbuffers::Vector<uint8_t> *data() const {
321  return GetPointer<const ::flatbuffers::Vector<uint8_t> *>(VT_DATA);
322  }
323  bool Verify(::flatbuffers::Verifier &verifier) const {
324  return VerifyTableStart(verifier) &&
325  VerifyOffset(verifier, VT_DATA) &&
326  verifier.VerifyVector(data()) &&
327  verifier.EndTable();
328  }
329 };
330 
333  ::flatbuffers::FlatBufferBuilder &fbb_;
334  ::flatbuffers::uoffset_t start_;
335  void add_data(::flatbuffers::Offset<::flatbuffers::Vector<uint8_t>> data) {
336  fbb_.AddOffset(ConstantBuffer8::VT_DATA, data);
337  }
338  explicit ConstantBuffer8Builder(::flatbuffers::FlatBufferBuilder &_fbb)
339  : fbb_(_fbb) {
340  start_ = fbb_.StartTable();
341  }
342  ::flatbuffers::Offset<ConstantBuffer8> Finish() {
343  const auto end = fbb_.EndTable(start_);
344  auto o = ::flatbuffers::Offset<ConstantBuffer8>(end);
345  return o;
346  }
347 };
348 
349 inline ::flatbuffers::Offset<ConstantBuffer8> CreateConstantBuffer8(
350  ::flatbuffers::FlatBufferBuilder &_fbb,
351  ::flatbuffers::Offset<::flatbuffers::Vector<uint8_t>> data = 0) {
352  ConstantBuffer8Builder builder_(_fbb);
353  builder_.add_data(data);
354  return builder_.Finish();
355 }
356 
359  static auto constexpr Create = CreateConstantBuffer8;
360 };
361 
362 inline ::flatbuffers::Offset<ConstantBuffer8> CreateConstantBuffer8Direct(
363  ::flatbuffers::FlatBufferBuilder &_fbb,
364  const std::vector<uint8_t> *data = nullptr) {
365  auto data__ = data ? _fbb.CreateVector<uint8_t>(*data) : 0;
367  _fbb,
368  data__);
369 }
370 
371 struct ConstantBuffer16 FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
373  struct Traits;
374  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
375  VT_DATA = 4
376  };
377  const ::flatbuffers::Vector<uint16_t> *data() const {
378  return GetPointer<const ::flatbuffers::Vector<uint16_t> *>(VT_DATA);
379  }
380  bool Verify(::flatbuffers::Verifier &verifier) const {
381  return VerifyTableStart(verifier) &&
382  VerifyOffset(verifier, VT_DATA) &&
383  verifier.VerifyVector(data()) &&
384  verifier.EndTable();
385  }
386 };
387 
390  ::flatbuffers::FlatBufferBuilder &fbb_;
391  ::flatbuffers::uoffset_t start_;
392  void add_data(::flatbuffers::Offset<::flatbuffers::Vector<uint16_t>> data) {
393  fbb_.AddOffset(ConstantBuffer16::VT_DATA, data);
394  }
395  explicit ConstantBuffer16Builder(::flatbuffers::FlatBufferBuilder &_fbb)
396  : fbb_(_fbb) {
397  start_ = fbb_.StartTable();
398  }
399  ::flatbuffers::Offset<ConstantBuffer16> Finish() {
400  const auto end = fbb_.EndTable(start_);
401  auto o = ::flatbuffers::Offset<ConstantBuffer16>(end);
402  return o;
403  }
404 };
405 
406 inline ::flatbuffers::Offset<ConstantBuffer16> CreateConstantBuffer16(
407  ::flatbuffers::FlatBufferBuilder &_fbb,
408  ::flatbuffers::Offset<::flatbuffers::Vector<uint16_t>> data = 0) {
409  ConstantBuffer16Builder builder_(_fbb);
410  builder_.add_data(data);
411  return builder_.Finish();
412 }
413 
416  static auto constexpr Create = CreateConstantBuffer16;
417 };
418 
419 inline ::flatbuffers::Offset<ConstantBuffer16> CreateConstantBuffer16Direct(
420  ::flatbuffers::FlatBufferBuilder &_fbb,
421  const std::vector<uint16_t> *data = nullptr) {
422  auto data__ = data ? _fbb.CreateVector<uint16_t>(*data) : 0;
424  _fbb,
425  data__);
426 }
427 
428 struct ConstantBuffer32 FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
430  struct Traits;
431  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
432  VT_DATA = 4
433  };
434  const ::flatbuffers::Vector<uint32_t> *data() const {
435  return GetPointer<const ::flatbuffers::Vector<uint32_t> *>(VT_DATA);
436  }
437  bool Verify(::flatbuffers::Verifier &verifier) const {
438  return VerifyTableStart(verifier) &&
439  VerifyOffset(verifier, VT_DATA) &&
440  verifier.VerifyVector(data()) &&
441  verifier.EndTable();
442  }
443 };
444 
447  ::flatbuffers::FlatBufferBuilder &fbb_;
448  ::flatbuffers::uoffset_t start_;
449  void add_data(::flatbuffers::Offset<::flatbuffers::Vector<uint32_t>> data) {
450  fbb_.AddOffset(ConstantBuffer32::VT_DATA, data);
451  }
452  explicit ConstantBuffer32Builder(::flatbuffers::FlatBufferBuilder &_fbb)
453  : fbb_(_fbb) {
454  start_ = fbb_.StartTable();
455  }
456  ::flatbuffers::Offset<ConstantBuffer32> Finish() {
457  const auto end = fbb_.EndTable(start_);
458  auto o = ::flatbuffers::Offset<ConstantBuffer32>(end);
459  return o;
460  }
461 };
462 
463 inline ::flatbuffers::Offset<ConstantBuffer32> CreateConstantBuffer32(
464  ::flatbuffers::FlatBufferBuilder &_fbb,
465  ::flatbuffers::Offset<::flatbuffers::Vector<uint32_t>> data = 0) {
466  ConstantBuffer32Builder builder_(_fbb);
467  builder_.add_data(data);
468  return builder_.Finish();
469 }
470 
473  static auto constexpr Create = CreateConstantBuffer32;
474 };
475 
476 inline ::flatbuffers::Offset<ConstantBuffer32> CreateConstantBuffer32Direct(
477  ::flatbuffers::FlatBufferBuilder &_fbb,
478  const std::vector<uint32_t> *data = nullptr) {
479  auto data__ = data ? _fbb.CreateVector<uint32_t>(*data) : 0;
481  _fbb,
482  data__);
483 }
484 
485 struct EnqueueWriteBufferCommand FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
487  struct Traits;
488  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
490  VT_SRC = 6,
491  VT_DST = 8
492  };
494  return static_cast<tt::target::metal::HostBuffer>(GetField<uint8_t>(VT_SRC_TYPE, 0));
495  }
496  const void *src() const {
497  return GetPointer<const void *>(VT_SRC);
498  }
499  template<typename T> const T *src_as() const;
500  const tt::target::TensorRef *src_as_TensorRef() const {
501  return src_type() == tt::target::metal::HostBuffer::TensorRef ? static_cast<const tt::target::TensorRef *>(src()) : nullptr;
502  }
503  const tt::target::metal::ConstantBuffer8 *src_as_ConstantBuffer8() const {
504  return src_type() == tt::target::metal::HostBuffer::ConstantBuffer8 ? static_cast<const tt::target::metal::ConstantBuffer8 *>(src()) : nullptr;
505  }
506  const tt::target::metal::ConstantBuffer16 *src_as_ConstantBuffer16() const {
507  return src_type() == tt::target::metal::HostBuffer::ConstantBuffer16 ? static_cast<const tt::target::metal::ConstantBuffer16 *>(src()) : nullptr;
508  }
509  const tt::target::metal::ConstantBuffer32 *src_as_ConstantBuffer32() const {
510  return src_type() == tt::target::metal::HostBuffer::ConstantBuffer32 ? static_cast<const tt::target::metal::ConstantBuffer32 *>(src()) : nullptr;
511  }
512  const tt::target::TensorRef *dst() const {
513  return GetPointer<const tt::target::TensorRef *>(VT_DST);
514  }
515  bool Verify(::flatbuffers::Verifier &verifier) const {
516  return VerifyTableStart(verifier) &&
517  VerifyField<uint8_t>(verifier, VT_SRC_TYPE, 1) &&
518  VerifyOffset(verifier, VT_SRC) &&
519  VerifyHostBuffer(verifier, src(), src_type()) &&
520  VerifyOffset(verifier, VT_DST) &&
521  verifier.VerifyTable(dst()) &&
522  verifier.EndTable();
523  }
524 };
525 
526 template<> inline const tt::target::TensorRef *EnqueueWriteBufferCommand::src_as<tt::target::TensorRef>() const {
527  return src_as_TensorRef();
528 }
529 
530 template<> inline const tt::target::metal::ConstantBuffer8 *EnqueueWriteBufferCommand::src_as<tt::target::metal::ConstantBuffer8>() const {
531  return src_as_ConstantBuffer8();
532 }
533 
534 template<> inline const tt::target::metal::ConstantBuffer16 *EnqueueWriteBufferCommand::src_as<tt::target::metal::ConstantBuffer16>() const {
535  return src_as_ConstantBuffer16();
536 }
537 
538 template<> inline const tt::target::metal::ConstantBuffer32 *EnqueueWriteBufferCommand::src_as<tt::target::metal::ConstantBuffer32>() const {
539  return src_as_ConstantBuffer32();
540 }
541 
544  ::flatbuffers::FlatBufferBuilder &fbb_;
545  ::flatbuffers::uoffset_t start_;
547  fbb_.AddElement<uint8_t>(EnqueueWriteBufferCommand::VT_SRC_TYPE, static_cast<uint8_t>(src_type), 0);
548  }
549  void add_src(::flatbuffers::Offset<void> src) {
550  fbb_.AddOffset(EnqueueWriteBufferCommand::VT_SRC, src);
551  }
552  void add_dst(::flatbuffers::Offset<tt::target::TensorRef> dst) {
553  fbb_.AddOffset(EnqueueWriteBufferCommand::VT_DST, dst);
554  }
555  explicit EnqueueWriteBufferCommandBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
556  : fbb_(_fbb) {
557  start_ = fbb_.StartTable();
558  }
559  ::flatbuffers::Offset<EnqueueWriteBufferCommand> Finish() {
560  const auto end = fbb_.EndTable(start_);
561  auto o = ::flatbuffers::Offset<EnqueueWriteBufferCommand>(end);
562  return o;
563  }
564 };
565 
566 inline ::flatbuffers::Offset<EnqueueWriteBufferCommand> CreateEnqueueWriteBufferCommand(
567  ::flatbuffers::FlatBufferBuilder &_fbb,
569  ::flatbuffers::Offset<void> src = 0,
570  ::flatbuffers::Offset<tt::target::TensorRef> dst = 0) {
571  EnqueueWriteBufferCommandBuilder builder_(_fbb);
572  builder_.add_dst(dst);
573  builder_.add_src(src);
574  builder_.add_src_type(src_type);
575  return builder_.Finish();
576 }
577 
580  static auto constexpr Create = CreateEnqueueWriteBufferCommand;
581 };
582 
583 struct EnqueueReadBufferCommand FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
585  struct Traits;
586  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
587  VT_SRC = 4,
588  VT_DST = 6
589  };
590  const tt::target::TensorRef *src() const {
591  return GetPointer<const tt::target::TensorRef *>(VT_SRC);
592  }
593  const tt::target::TensorRef *dst() const {
594  return GetPointer<const tt::target::TensorRef *>(VT_DST);
595  }
596  bool Verify(::flatbuffers::Verifier &verifier) const {
597  return VerifyTableStart(verifier) &&
598  VerifyOffset(verifier, VT_SRC) &&
599  verifier.VerifyTable(src()) &&
600  VerifyOffset(verifier, VT_DST) &&
601  verifier.VerifyTable(dst()) &&
602  verifier.EndTable();
603  }
604 };
605 
608  ::flatbuffers::FlatBufferBuilder &fbb_;
609  ::flatbuffers::uoffset_t start_;
610  void add_src(::flatbuffers::Offset<tt::target::TensorRef> src) {
611  fbb_.AddOffset(EnqueueReadBufferCommand::VT_SRC, src);
612  }
613  void add_dst(::flatbuffers::Offset<tt::target::TensorRef> dst) {
614  fbb_.AddOffset(EnqueueReadBufferCommand::VT_DST, dst);
615  }
616  explicit EnqueueReadBufferCommandBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
617  : fbb_(_fbb) {
618  start_ = fbb_.StartTable();
619  }
620  ::flatbuffers::Offset<EnqueueReadBufferCommand> Finish() {
621  const auto end = fbb_.EndTable(start_);
622  auto o = ::flatbuffers::Offset<EnqueueReadBufferCommand>(end);
623  return o;
624  }
625 };
626 
627 inline ::flatbuffers::Offset<EnqueueReadBufferCommand> CreateEnqueueReadBufferCommand(
628  ::flatbuffers::FlatBufferBuilder &_fbb,
629  ::flatbuffers::Offset<tt::target::TensorRef> src = 0,
630  ::flatbuffers::Offset<tt::target::TensorRef> dst = 0) {
631  EnqueueReadBufferCommandBuilder builder_(_fbb);
632  builder_.add_dst(dst);
633  builder_.add_src(src);
634  return builder_.Finish();
635 }
636 
639  static auto constexpr Create = CreateEnqueueReadBufferCommand;
640 };
641 
642 struct CreateBufferCommand FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
644  struct Traits;
645  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
646  VT_REF = 4
647  };
648  const tt::target::TensorRef *ref() const {
649  return GetPointer<const tt::target::TensorRef *>(VT_REF);
650  }
651  bool Verify(::flatbuffers::Verifier &verifier) const {
652  return VerifyTableStart(verifier) &&
653  VerifyOffset(verifier, VT_REF) &&
654  verifier.VerifyTable(ref()) &&
655  verifier.EndTable();
656  }
657 };
658 
661  ::flatbuffers::FlatBufferBuilder &fbb_;
662  ::flatbuffers::uoffset_t start_;
663  void add_ref(::flatbuffers::Offset<tt::target::TensorRef> ref) {
664  fbb_.AddOffset(CreateBufferCommand::VT_REF, ref);
665  }
666  explicit CreateBufferCommandBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
667  : fbb_(_fbb) {
668  start_ = fbb_.StartTable();
669  }
670  ::flatbuffers::Offset<CreateBufferCommand> Finish() {
671  const auto end = fbb_.EndTable(start_);
672  auto o = ::flatbuffers::Offset<CreateBufferCommand>(end);
673  return o;
674  }
675 };
676 
677 inline ::flatbuffers::Offset<CreateBufferCommand> CreateCreateBufferCommand(
678  ::flatbuffers::FlatBufferBuilder &_fbb,
679  ::flatbuffers::Offset<tt::target::TensorRef> ref = 0) {
680  CreateBufferCommandBuilder builder_(_fbb);
681  builder_.add_ref(ref);
682  return builder_.Finish();
683 }
684 
687  static auto constexpr Create = CreateCreateBufferCommand;
688 };
689 
690 struct DeallocateBufferCommand FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
692  struct Traits;
693  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
694  VT_REF = 4
695  };
696  const tt::target::TensorRef *ref() const {
697  return GetPointer<const tt::target::TensorRef *>(VT_REF);
698  }
699  bool Verify(::flatbuffers::Verifier &verifier) const {
700  return VerifyTableStart(verifier) &&
701  VerifyOffset(verifier, VT_REF) &&
702  verifier.VerifyTable(ref()) &&
703  verifier.EndTable();
704  }
705 };
706 
709  ::flatbuffers::FlatBufferBuilder &fbb_;
710  ::flatbuffers::uoffset_t start_;
711  void add_ref(::flatbuffers::Offset<tt::target::TensorRef> ref) {
712  fbb_.AddOffset(DeallocateBufferCommand::VT_REF, ref);
713  }
714  explicit DeallocateBufferCommandBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
715  : fbb_(_fbb) {
716  start_ = fbb_.StartTable();
717  }
718  ::flatbuffers::Offset<DeallocateBufferCommand> Finish() {
719  const auto end = fbb_.EndTable(start_);
720  auto o = ::flatbuffers::Offset<DeallocateBufferCommand>(end);
721  return o;
722  }
723 };
724 
725 inline ::flatbuffers::Offset<DeallocateBufferCommand> CreateDeallocateBufferCommand(
726  ::flatbuffers::FlatBufferBuilder &_fbb,
727  ::flatbuffers::Offset<tt::target::TensorRef> ref = 0) {
728  DeallocateBufferCommandBuilder builder_(_fbb);
729  builder_.add_ref(ref);
730  return builder_.Finish();
731 }
732 
735  static auto constexpr Create = CreateDeallocateBufferCommand;
736 };
737 
738 struct CreateEventCommand FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
740  struct Traits;
741  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
742  VT_REF = 4
743  };
744  const tt::target::EventRef *ref() const {
745  return GetPointer<const tt::target::EventRef *>(VT_REF);
746  }
747  bool Verify(::flatbuffers::Verifier &verifier) const {
748  return VerifyTableStart(verifier) &&
749  VerifyOffset(verifier, VT_REF) &&
750  verifier.VerifyTable(ref()) &&
751  verifier.EndTable();
752  }
753 };
754 
757  ::flatbuffers::FlatBufferBuilder &fbb_;
758  ::flatbuffers::uoffset_t start_;
759  void add_ref(::flatbuffers::Offset<tt::target::EventRef> ref) {
760  fbb_.AddOffset(CreateEventCommand::VT_REF, ref);
761  }
762  explicit CreateEventCommandBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
763  : fbb_(_fbb) {
764  start_ = fbb_.StartTable();
765  }
766  ::flatbuffers::Offset<CreateEventCommand> Finish() {
767  const auto end = fbb_.EndTable(start_);
768  auto o = ::flatbuffers::Offset<CreateEventCommand>(end);
769  return o;
770  }
771 };
772 
773 inline ::flatbuffers::Offset<CreateEventCommand> CreateCreateEventCommand(
774  ::flatbuffers::FlatBufferBuilder &_fbb,
775  ::flatbuffers::Offset<tt::target::EventRef> ref = 0) {
776  CreateEventCommandBuilder builder_(_fbb);
777  builder_.add_ref(ref);
778  return builder_.Finish();
779 }
780 
783  static auto constexpr Create = CreateCreateEventCommand;
784 };
785 
786 struct EnqueueRecordEventCommand FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
788  struct Traits;
789  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
790  VT_REF = 4
791  };
792  const tt::target::EventRef *ref() const {
793  return GetPointer<const tt::target::EventRef *>(VT_REF);
794  }
795  bool Verify(::flatbuffers::Verifier &verifier) const {
796  return VerifyTableStart(verifier) &&
797  VerifyOffset(verifier, VT_REF) &&
798  verifier.VerifyTable(ref()) &&
799  verifier.EndTable();
800  }
801 };
802 
805  ::flatbuffers::FlatBufferBuilder &fbb_;
806  ::flatbuffers::uoffset_t start_;
807  void add_ref(::flatbuffers::Offset<tt::target::EventRef> ref) {
808  fbb_.AddOffset(EnqueueRecordEventCommand::VT_REF, ref);
809  }
810  explicit EnqueueRecordEventCommandBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
811  : fbb_(_fbb) {
812  start_ = fbb_.StartTable();
813  }
814  ::flatbuffers::Offset<EnqueueRecordEventCommand> Finish() {
815  const auto end = fbb_.EndTable(start_);
816  auto o = ::flatbuffers::Offset<EnqueueRecordEventCommand>(end);
817  return o;
818  }
819 };
820 
821 inline ::flatbuffers::Offset<EnqueueRecordEventCommand> CreateEnqueueRecordEventCommand(
822  ::flatbuffers::FlatBufferBuilder &_fbb,
823  ::flatbuffers::Offset<tt::target::EventRef> ref = 0) {
824  EnqueueRecordEventCommandBuilder builder_(_fbb);
825  builder_.add_ref(ref);
826  return builder_.Finish();
827 }
828 
831  static auto constexpr Create = CreateEnqueueRecordEventCommand;
832 };
833 
834 struct EnqueueWaitForEventCommand FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
836  struct Traits;
837  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
838  VT_REF = 4
839  };
840  const tt::target::EventRef *ref() const {
841  return GetPointer<const tt::target::EventRef *>(VT_REF);
842  }
843  bool Verify(::flatbuffers::Verifier &verifier) const {
844  return VerifyTableStart(verifier) &&
845  VerifyOffset(verifier, VT_REF) &&
846  verifier.VerifyTable(ref()) &&
847  verifier.EndTable();
848  }
849 };
850 
853  ::flatbuffers::FlatBufferBuilder &fbb_;
854  ::flatbuffers::uoffset_t start_;
855  void add_ref(::flatbuffers::Offset<tt::target::EventRef> ref) {
856  fbb_.AddOffset(EnqueueWaitForEventCommand::VT_REF, ref);
857  }
858  explicit EnqueueWaitForEventCommandBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
859  : fbb_(_fbb) {
860  start_ = fbb_.StartTable();
861  }
862  ::flatbuffers::Offset<EnqueueWaitForEventCommand> Finish() {
863  const auto end = fbb_.EndTable(start_);
864  auto o = ::flatbuffers::Offset<EnqueueWaitForEventCommand>(end);
865  return o;
866  }
867 };
868 
869 inline ::flatbuffers::Offset<EnqueueWaitForEventCommand> CreateEnqueueWaitForEventCommand(
870  ::flatbuffers::FlatBufferBuilder &_fbb,
871  ::flatbuffers::Offset<tt::target::EventRef> ref = 0) {
872  EnqueueWaitForEventCommandBuilder builder_(_fbb);
873  builder_.add_ref(ref);
874  return builder_.Finish();
875 }
876 
879  static auto constexpr Create = CreateEnqueueWaitForEventCommand;
880 };
881 
882 struct EventSynchronizeCommand FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
884  struct Traits;
885  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
886  VT_REF = 4
887  };
888  const tt::target::EventRef *ref() const {
889  return GetPointer<const tt::target::EventRef *>(VT_REF);
890  }
891  bool Verify(::flatbuffers::Verifier &verifier) const {
892  return VerifyTableStart(verifier) &&
893  VerifyOffset(verifier, VT_REF) &&
894  verifier.VerifyTable(ref()) &&
895  verifier.EndTable();
896  }
897 };
898 
901  ::flatbuffers::FlatBufferBuilder &fbb_;
902  ::flatbuffers::uoffset_t start_;
903  void add_ref(::flatbuffers::Offset<tt::target::EventRef> ref) {
904  fbb_.AddOffset(EventSynchronizeCommand::VT_REF, ref);
905  }
906  explicit EventSynchronizeCommandBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
907  : fbb_(_fbb) {
908  start_ = fbb_.StartTable();
909  }
910  ::flatbuffers::Offset<EventSynchronizeCommand> Finish() {
911  const auto end = fbb_.EndTable(start_);
912  auto o = ::flatbuffers::Offset<EventSynchronizeCommand>(end);
913  return o;
914  }
915 };
916 
917 inline ::flatbuffers::Offset<EventSynchronizeCommand> CreateEventSynchronizeCommand(
918  ::flatbuffers::FlatBufferBuilder &_fbb,
919  ::flatbuffers::Offset<tt::target::EventRef> ref = 0) {
920  EventSynchronizeCommandBuilder builder_(_fbb);
921  builder_.add_ref(ref);
922  return builder_.Finish();
923 }
924 
927  static auto constexpr Create = CreateEventSynchronizeCommand;
928 };
929 
930 struct EventQueryCommand FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
932  struct Traits;
933  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
934  VT_REF = 4
935  };
936  const tt::target::EventRef *ref() const {
937  return GetPointer<const tt::target::EventRef *>(VT_REF);
938  }
939  bool Verify(::flatbuffers::Verifier &verifier) const {
940  return VerifyTableStart(verifier) &&
941  VerifyOffset(verifier, VT_REF) &&
942  verifier.VerifyTable(ref()) &&
943  verifier.EndTable();
944  }
945 };
946 
949  ::flatbuffers::FlatBufferBuilder &fbb_;
950  ::flatbuffers::uoffset_t start_;
951  void add_ref(::flatbuffers::Offset<tt::target::EventRef> ref) {
952  fbb_.AddOffset(EventQueryCommand::VT_REF, ref);
953  }
954  explicit EventQueryCommandBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
955  : fbb_(_fbb) {
956  start_ = fbb_.StartTable();
957  }
958  ::flatbuffers::Offset<EventQueryCommand> Finish() {
959  const auto end = fbb_.EndTable(start_);
960  auto o = ::flatbuffers::Offset<EventQueryCommand>(end);
961  return o;
962  }
963 };
964 
965 inline ::flatbuffers::Offset<EventQueryCommand> CreateEventQueryCommand(
966  ::flatbuffers::FlatBufferBuilder &_fbb,
967  ::flatbuffers::Offset<tt::target::EventRef> ref = 0) {
968  EventQueryCommandBuilder builder_(_fbb);
969  builder_.add_ref(ref);
970  return builder_.Finish();
971 }
972 
975  static auto constexpr Create = CreateEventQueryCommand;
976 };
977 
978 struct FinishCommand FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
980  struct Traits;
981  bool Verify(::flatbuffers::Verifier &verifier) const {
982  return VerifyTableStart(verifier) &&
983  verifier.EndTable();
984  }
985 };
986 
989  ::flatbuffers::FlatBufferBuilder &fbb_;
990  ::flatbuffers::uoffset_t start_;
991  explicit FinishCommandBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
992  : fbb_(_fbb) {
993  start_ = fbb_.StartTable();
994  }
995  ::flatbuffers::Offset<FinishCommand> Finish() {
996  const auto end = fbb_.EndTable(start_);
997  auto o = ::flatbuffers::Offset<FinishCommand>(end);
998  return o;
999  }
1000 };
1001 
1002 inline ::flatbuffers::Offset<FinishCommand> CreateFinishCommand(
1003  ::flatbuffers::FlatBufferBuilder &_fbb) {
1004  FinishCommandBuilder builder_(_fbb);
1005  return builder_.Finish();
1006 }
1007 
1010  static auto constexpr Create = CreateFinishCommand;
1011 };
1012 
1013 struct Command FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
1015  struct Traits;
1016  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
1018  VT_TYPE = 6,
1019  VT_DEBUG_INFO = 8
1020  };
1022  return static_cast<tt::target::metal::CommandType>(GetField<uint8_t>(VT_TYPE_TYPE, 0));
1023  }
1024  const void *type() const {
1025  return GetPointer<const void *>(VT_TYPE);
1026  }
1027  template<typename T> const T *type_as() const;
1028  const tt::target::metal::EnqueueProgramCommand *type_as_EnqueueProgramCommand() const {
1029  return type_type() == tt::target::metal::CommandType::EnqueueProgramCommand ? static_cast<const tt::target::metal::EnqueueProgramCommand *>(type()) : nullptr;
1030  }
1031  const tt::target::metal::EnqueueWriteBufferCommand *type_as_EnqueueWriteBufferCommand() const {
1032  return type_type() == tt::target::metal::CommandType::EnqueueWriteBufferCommand ? static_cast<const tt::target::metal::EnqueueWriteBufferCommand *>(type()) : nullptr;
1033  }
1034  const tt::target::metal::EnqueueReadBufferCommand *type_as_EnqueueReadBufferCommand() const {
1035  return type_type() == tt::target::metal::CommandType::EnqueueReadBufferCommand ? static_cast<const tt::target::metal::EnqueueReadBufferCommand *>(type()) : nullptr;
1036  }
1037  const tt::target::metal::CreateBufferCommand *type_as_CreateBufferCommand() const {
1038  return type_type() == tt::target::metal::CommandType::CreateBufferCommand ? static_cast<const tt::target::metal::CreateBufferCommand *>(type()) : nullptr;
1039  }
1040  const tt::target::metal::DeallocateBufferCommand *type_as_DeallocateBufferCommand() const {
1041  return type_type() == tt::target::metal::CommandType::DeallocateBufferCommand ? static_cast<const tt::target::metal::DeallocateBufferCommand *>(type()) : nullptr;
1042  }
1043  const tt::target::metal::CreateEventCommand *type_as_CreateEventCommand() const {
1044  return type_type() == tt::target::metal::CommandType::CreateEventCommand ? static_cast<const tt::target::metal::CreateEventCommand *>(type()) : nullptr;
1045  }
1046  const tt::target::metal::EnqueueRecordEventCommand *type_as_EnqueueRecordEventCommand() const {
1047  return type_type() == tt::target::metal::CommandType::EnqueueRecordEventCommand ? static_cast<const tt::target::metal::EnqueueRecordEventCommand *>(type()) : nullptr;
1048  }
1049  const tt::target::metal::EnqueueWaitForEventCommand *type_as_EnqueueWaitForEventCommand() const {
1050  return type_type() == tt::target::metal::CommandType::EnqueueWaitForEventCommand ? static_cast<const tt::target::metal::EnqueueWaitForEventCommand *>(type()) : nullptr;
1051  }
1052  const tt::target::metal::EventSynchronizeCommand *type_as_EventSynchronizeCommand() const {
1053  return type_type() == tt::target::metal::CommandType::EventSynchronizeCommand ? static_cast<const tt::target::metal::EventSynchronizeCommand *>(type()) : nullptr;
1054  }
1055  const tt::target::metal::EventQueryCommand *type_as_EventQueryCommand() const {
1056  return type_type() == tt::target::metal::CommandType::EventQueryCommand ? static_cast<const tt::target::metal::EventQueryCommand *>(type()) : nullptr;
1057  }
1058  const tt::target::metal::FinishCommand *type_as_FinishCommand() const {
1059  return type_type() == tt::target::metal::CommandType::FinishCommand ? static_cast<const tt::target::metal::FinishCommand *>(type()) : nullptr;
1060  }
1061  const ::flatbuffers::String *debug_info() const {
1062  return GetPointer<const ::flatbuffers::String *>(VT_DEBUG_INFO);
1063  }
1064  bool Verify(::flatbuffers::Verifier &verifier) const {
1065  return VerifyTableStart(verifier) &&
1066  VerifyField<uint8_t>(verifier, VT_TYPE_TYPE, 1) &&
1067  VerifyOffset(verifier, VT_TYPE) &&
1068  VerifyCommandType(verifier, type(), type_type()) &&
1069  VerifyOffset(verifier, VT_DEBUG_INFO) &&
1070  verifier.VerifyString(debug_info()) &&
1071  verifier.EndTable();
1072  }
1073 };
1074 
1075 template<> inline const tt::target::metal::EnqueueProgramCommand *Command::type_as<tt::target::metal::EnqueueProgramCommand>() const {
1076  return type_as_EnqueueProgramCommand();
1077 }
1078 
1079 template<> inline const tt::target::metal::EnqueueWriteBufferCommand *Command::type_as<tt::target::metal::EnqueueWriteBufferCommand>() const {
1080  return type_as_EnqueueWriteBufferCommand();
1081 }
1082 
1083 template<> inline const tt::target::metal::EnqueueReadBufferCommand *Command::type_as<tt::target::metal::EnqueueReadBufferCommand>() const {
1084  return type_as_EnqueueReadBufferCommand();
1085 }
1086 
1087 template<> inline const tt::target::metal::CreateBufferCommand *Command::type_as<tt::target::metal::CreateBufferCommand>() const {
1088  return type_as_CreateBufferCommand();
1089 }
1090 
1091 template<> inline const tt::target::metal::DeallocateBufferCommand *Command::type_as<tt::target::metal::DeallocateBufferCommand>() const {
1092  return type_as_DeallocateBufferCommand();
1093 }
1094 
1095 template<> inline const tt::target::metal::CreateEventCommand *Command::type_as<tt::target::metal::CreateEventCommand>() const {
1096  return type_as_CreateEventCommand();
1097 }
1098 
1099 template<> inline const tt::target::metal::EnqueueRecordEventCommand *Command::type_as<tt::target::metal::EnqueueRecordEventCommand>() const {
1100  return type_as_EnqueueRecordEventCommand();
1101 }
1102 
1103 template<> inline const tt::target::metal::EnqueueWaitForEventCommand *Command::type_as<tt::target::metal::EnqueueWaitForEventCommand>() const {
1104  return type_as_EnqueueWaitForEventCommand();
1105 }
1106 
1107 template<> inline const tt::target::metal::EventSynchronizeCommand *Command::type_as<tt::target::metal::EventSynchronizeCommand>() const {
1108  return type_as_EventSynchronizeCommand();
1109 }
1110 
1111 template<> inline const tt::target::metal::EventQueryCommand *Command::type_as<tt::target::metal::EventQueryCommand>() const {
1112  return type_as_EventQueryCommand();
1113 }
1114 
1115 template<> inline const tt::target::metal::FinishCommand *Command::type_as<tt::target::metal::FinishCommand>() const {
1116  return type_as_FinishCommand();
1117 }
1118 
1120  typedef Command Table;
1121  ::flatbuffers::FlatBufferBuilder &fbb_;
1122  ::flatbuffers::uoffset_t start_;
1124  fbb_.AddElement<uint8_t>(Command::VT_TYPE_TYPE, static_cast<uint8_t>(type_type), 0);
1125  }
1126  void add_type(::flatbuffers::Offset<void> type) {
1127  fbb_.AddOffset(Command::VT_TYPE, type);
1128  }
1129  void add_debug_info(::flatbuffers::Offset<::flatbuffers::String> debug_info) {
1130  fbb_.AddOffset(Command::VT_DEBUG_INFO, debug_info);
1131  }
1132  explicit CommandBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
1133  : fbb_(_fbb) {
1134  start_ = fbb_.StartTable();
1135  }
1136  ::flatbuffers::Offset<Command> Finish() {
1137  const auto end = fbb_.EndTable(start_);
1138  auto o = ::flatbuffers::Offset<Command>(end);
1139  return o;
1140  }
1141 };
1142 
1143 inline ::flatbuffers::Offset<Command> CreateCommand(
1144  ::flatbuffers::FlatBufferBuilder &_fbb,
1146  ::flatbuffers::Offset<void> type = 0,
1147  ::flatbuffers::Offset<::flatbuffers::String> debug_info = 0) {
1148  CommandBuilder builder_(_fbb);
1149  builder_.add_debug_info(debug_info);
1150  builder_.add_type(type);
1151  builder_.add_type_type(type_type);
1152  return builder_.Finish();
1153 }
1154 
1156  using type = Command;
1157  static auto constexpr Create = CreateCommand;
1158 };
1159 
1160 inline ::flatbuffers::Offset<Command> CreateCommandDirect(
1161  ::flatbuffers::FlatBufferBuilder &_fbb,
1163  ::flatbuffers::Offset<void> type = 0,
1164  const char *debug_info = nullptr) {
1165  auto debug_info__ = debug_info ? _fbb.CreateString(debug_info) : 0;
1167  _fbb,
1168  type_type,
1169  type,
1170  debug_info__);
1171 }
1172 
1173 struct CommandQueue FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
1175  struct Traits;
1176  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
1177  VT_NAME = 4,
1178  VT_COMMANDS = 6
1179  };
1180  const ::flatbuffers::String *name() const {
1181  return GetPointer<const ::flatbuffers::String *>(VT_NAME);
1182  }
1183  const ::flatbuffers::Vector<::flatbuffers::Offset<tt::target::metal::Command>> *commands() const {
1184  return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<tt::target::metal::Command>> *>(VT_COMMANDS);
1185  }
1186  bool Verify(::flatbuffers::Verifier &verifier) const {
1187  return VerifyTableStart(verifier) &&
1188  VerifyOffset(verifier, VT_NAME) &&
1189  verifier.VerifyString(name()) &&
1190  VerifyOffset(verifier, VT_COMMANDS) &&
1191  verifier.VerifyVector(commands()) &&
1192  verifier.VerifyVectorOfTables(commands()) &&
1193  verifier.EndTable();
1194  }
1195 };
1196 
1198  typedef CommandQueue Table;
1199  ::flatbuffers::FlatBufferBuilder &fbb_;
1200  ::flatbuffers::uoffset_t start_;
1201  void add_name(::flatbuffers::Offset<::flatbuffers::String> name) {
1202  fbb_.AddOffset(CommandQueue::VT_NAME, name);
1203  }
1204  void add_commands(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<tt::target::metal::Command>>> commands) {
1205  fbb_.AddOffset(CommandQueue::VT_COMMANDS, commands);
1206  }
1207  explicit CommandQueueBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
1208  : fbb_(_fbb) {
1209  start_ = fbb_.StartTable();
1210  }
1211  ::flatbuffers::Offset<CommandQueue> Finish() {
1212  const auto end = fbb_.EndTable(start_);
1213  auto o = ::flatbuffers::Offset<CommandQueue>(end);
1214  return o;
1215  }
1216 };
1217 
1218 inline ::flatbuffers::Offset<CommandQueue> CreateCommandQueue(
1219  ::flatbuffers::FlatBufferBuilder &_fbb,
1220  ::flatbuffers::Offset<::flatbuffers::String> name = 0,
1221  ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<tt::target::metal::Command>>> commands = 0) {
1222  CommandQueueBuilder builder_(_fbb);
1223  builder_.add_commands(commands);
1224  builder_.add_name(name);
1225  return builder_.Finish();
1226 }
1227 
1229  using type = CommandQueue;
1230  static auto constexpr Create = CreateCommandQueue;
1231 };
1232 
1233 inline ::flatbuffers::Offset<CommandQueue> CreateCommandQueueDirect(
1234  ::flatbuffers::FlatBufferBuilder &_fbb,
1235  const char *name = nullptr,
1236  const std::vector<::flatbuffers::Offset<tt::target::metal::Command>> *commands = nullptr) {
1237  auto name__ = name ? _fbb.CreateString(name) : 0;
1238  auto commands__ = commands ? _fbb.CreateVector<::flatbuffers::Offset<tt::target::metal::Command>>(*commands) : 0;
1240  _fbb,
1241  name__,
1242  commands__);
1243 }
1244 
1245 inline bool VerifyHostBuffer(::flatbuffers::Verifier &verifier, const void *obj, HostBuffer type) {
1246  switch (type) {
1247  case HostBuffer::NONE: {
1248  return true;
1249  }
1250  case HostBuffer::TensorRef: {
1251  auto ptr = reinterpret_cast<const tt::target::TensorRef *>(obj);
1252  return verifier.VerifyTable(ptr);
1253  }
1255  auto ptr = reinterpret_cast<const tt::target::metal::ConstantBuffer8 *>(obj);
1256  return verifier.VerifyTable(ptr);
1257  }
1259  auto ptr = reinterpret_cast<const tt::target::metal::ConstantBuffer16 *>(obj);
1260  return verifier.VerifyTable(ptr);
1261  }
1263  auto ptr = reinterpret_cast<const tt::target::metal::ConstantBuffer32 *>(obj);
1264  return verifier.VerifyTable(ptr);
1265  }
1266  default: return true;
1267  }
1268 }
1269 
1270 inline bool VerifyHostBufferVector(::flatbuffers::Verifier &verifier, const ::flatbuffers::Vector<::flatbuffers::Offset<void>> *values, const ::flatbuffers::Vector<HostBuffer> *types) {
1271  if (!values || !types) return !values && !types;
1272  if (values->size() != types->size()) return false;
1273  for (::flatbuffers::uoffset_t i = 0; i < values->size(); ++i) {
1274  if (!VerifyHostBuffer(
1275  verifier, values->Get(i), types->GetEnum<HostBuffer>(i))) {
1276  return false;
1277  }
1278  }
1279  return true;
1280 }
1281 
1282 inline bool VerifyCommandType(::flatbuffers::Verifier &verifier, const void *obj, CommandType type) {
1283  switch (type) {
1284  case CommandType::NONE: {
1285  return true;
1286  }
1288  auto ptr = reinterpret_cast<const tt::target::metal::EnqueueProgramCommand *>(obj);
1289  return verifier.VerifyTable(ptr);
1290  }
1292  auto ptr = reinterpret_cast<const tt::target::metal::EnqueueWriteBufferCommand *>(obj);
1293  return verifier.VerifyTable(ptr);
1294  }
1296  auto ptr = reinterpret_cast<const tt::target::metal::EnqueueReadBufferCommand *>(obj);
1297  return verifier.VerifyTable(ptr);
1298  }
1300  auto ptr = reinterpret_cast<const tt::target::metal::CreateBufferCommand *>(obj);
1301  return verifier.VerifyTable(ptr);
1302  }
1304  auto ptr = reinterpret_cast<const tt::target::metal::DeallocateBufferCommand *>(obj);
1305  return verifier.VerifyTable(ptr);
1306  }
1308  auto ptr = reinterpret_cast<const tt::target::metal::CreateEventCommand *>(obj);
1309  return verifier.VerifyTable(ptr);
1310  }
1312  auto ptr = reinterpret_cast<const tt::target::metal::EnqueueRecordEventCommand *>(obj);
1313  return verifier.VerifyTable(ptr);
1314  }
1316  auto ptr = reinterpret_cast<const tt::target::metal::EnqueueWaitForEventCommand *>(obj);
1317  return verifier.VerifyTable(ptr);
1318  }
1320  auto ptr = reinterpret_cast<const tt::target::metal::EventSynchronizeCommand *>(obj);
1321  return verifier.VerifyTable(ptr);
1322  }
1324  auto ptr = reinterpret_cast<const tt::target::metal::EventQueryCommand *>(obj);
1325  return verifier.VerifyTable(ptr);
1326  }
1328  auto ptr = reinterpret_cast<const tt::target::metal::FinishCommand *>(obj);
1329  return verifier.VerifyTable(ptr);
1330  }
1331  default: return true;
1332  }
1333 }
1334 
1335 inline bool VerifyCommandTypeVector(::flatbuffers::Verifier &verifier, const ::flatbuffers::Vector<::flatbuffers::Offset<void>> *values, const ::flatbuffers::Vector<CommandType> *types) {
1336  if (!values || !types) return !values && !types;
1337  if (values->size() != types->size()) return false;
1338  for (::flatbuffers::uoffset_t i = 0; i < values->size(); ++i) {
1339  if (!VerifyCommandType(
1340  verifier, values->Get(i), types->GetEnum<CommandType>(i))) {
1341  return false;
1342  }
1343  }
1344  return true;
1345 }
1346 
1347 } // namespace metal
1348 } // namespace target
1349 } // namespace tt
1350 
1351 #endif // FLATBUFFERS_GENERATED_COMMAND_TT_TARGET_METAL_H_
VT_DATA
Definition: program_generated.h:668
VT_OPERANDS
Definition: command_generated.h:247
VT_SRC
Definition: command_generated.h:490
VT_SRC_TYPE
Definition: command_generated.h:489
VT_TYPE_TYPE
Definition: command_generated.h:1017
VT_TYPE
Definition: command_generated.h:1018
VT_NAME
Definition: command_generated.h:1177
inline ::flatbuffers::Offset< EnqueueWriteBufferCommand > CreateEnqueueWriteBufferCommand(::flatbuffers::FlatBufferBuilder &_fbb, tt::target::metal::HostBuffer src_type=tt::target::metal::HostBuffer::NONE, ::flatbuffers::Offset< void > src=0, ::flatbuffers::Offset< tt::target::TensorRef > dst=0)
Definition: command_generated.h:566
inline ::flatbuffers::Offset< ConstantBuffer8 > CreateConstantBuffer8(::flatbuffers::FlatBufferBuilder &_fbb, ::flatbuffers::Offset<::flatbuffers::Vector< uint8_t >> data=0)
Definition: command_generated.h:349
inline ::flatbuffers::Offset< EnqueueReadBufferCommand > CreateEnqueueReadBufferCommand(::flatbuffers::FlatBufferBuilder &_fbb, ::flatbuffers::Offset< tt::target::TensorRef > src=0, ::flatbuffers::Offset< tt::target::TensorRef > dst=0)
Definition: command_generated.h:627
inline ::flatbuffers::Offset< EnqueueProgramCommand > CreateEnqueueProgramCommandDirect(::flatbuffers::FlatBufferBuilder &_fbb, const std::vector<::flatbuffers::Offset< tt::target::TensorRef >> *operands=nullptr, ::flatbuffers::Offset< tt::target::metal::ProgramDesc > program=0)
Definition: command_generated.h:303
inline ::flatbuffers::Offset< ConstantBuffer8 > CreateConstantBuffer8Direct(::flatbuffers::FlatBufferBuilder &_fbb, const std::vector< uint8_t > *data=nullptr)
Definition: command_generated.h:362
inline ::flatbuffers::Offset< EnqueueWaitForEventCommand > CreateEnqueueWaitForEventCommand(::flatbuffers::FlatBufferBuilder &_fbb, ::flatbuffers::Offset< tt::target::EventRef > ref=0)
Definition: command_generated.h:869
const CommandType(& EnumValuesCommandType())[12]
Definition: command_generated.h:149
inline ::flatbuffers::Offset< DeallocateBufferCommand > CreateDeallocateBufferCommand(::flatbuffers::FlatBufferBuilder &_fbb, ::flatbuffers::Offset< tt::target::TensorRef > ref=0)
Definition: command_generated.h:725
inline ::flatbuffers::Offset< CommandQueue > CreateCommandQueue(::flatbuffers::FlatBufferBuilder &_fbb, ::flatbuffers::Offset<::flatbuffers::String > name=0, ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset< tt::target::metal::Command >>> commands=0)
Definition: command_generated.h:1218
inline ::flatbuffers::Offset< CreateBufferCommand > CreateCreateBufferCommand(::flatbuffers::FlatBufferBuilder &_fbb, ::flatbuffers::Offset< tt::target::TensorRef > ref=0)
Definition: command_generated.h:677
CommandType
Definition: command_generated.h:132
const char *const * EnumNamesCommandType()
Definition: command_generated.h:167
bool VerifyCommandType(::flatbuffers::Verifier &verifier, const void *obj, CommandType type)
Definition: command_generated.h:1282
bool VerifyCommandTypeVector(::flatbuffers::Verifier &verifier, const ::flatbuffers::Vector<::flatbuffers::Offset< void >> *values, const ::flatbuffers::Vector< CommandType > *types)
Definition: command_generated.h:1335
inline ::flatbuffers::Offset< EventQueryCommand > CreateEventQueryCommand(::flatbuffers::FlatBufferBuilder &_fbb, ::flatbuffers::Offset< tt::target::EventRef > ref=0)
Definition: command_generated.h:965
inline ::flatbuffers::Offset< EventSynchronizeCommand > CreateEventSynchronizeCommand(::flatbuffers::FlatBufferBuilder &_fbb, ::flatbuffers::Offset< tt::target::EventRef > ref=0)
Definition: command_generated.h:917
const char * EnumNameCommandType(CommandType e)
Definition: command_generated.h:186
HostBuffer
Definition: command_generated.h:70
bool VerifyHostBufferVector(::flatbuffers::Verifier &verifier, const ::flatbuffers::Vector<::flatbuffers::Offset< void >> *values, const ::flatbuffers::Vector< HostBuffer > *types)
Definition: command_generated.h:1270
const char *const * EnumNamesHostBuffer()
Definition: command_generated.h:91
inline ::flatbuffers::Offset< Command > CreateCommand(::flatbuffers::FlatBufferBuilder &_fbb, tt::target::metal::CommandType type_type=tt::target::metal::CommandType::NONE, ::flatbuffers::Offset< void > type=0, ::flatbuffers::Offset<::flatbuffers::String > debug_info=0)
Definition: command_generated.h:1143
inline ::flatbuffers::Offset< ConstantBuffer32 > CreateConstantBuffer32(::flatbuffers::FlatBufferBuilder &_fbb, ::flatbuffers::Offset<::flatbuffers::Vector< uint32_t >> data=0)
Definition: command_generated.h:463
inline ::flatbuffers::Offset< Command > CreateCommandDirect(::flatbuffers::FlatBufferBuilder &_fbb, tt::target::metal::CommandType type_type=tt::target::metal::CommandType::NONE, ::flatbuffers::Offset< void > type=0, const char *debug_info=nullptr)
Definition: command_generated.h:1160
inline ::flatbuffers::Offset< EnqueueRecordEventCommand > CreateEnqueueRecordEventCommand(::flatbuffers::FlatBufferBuilder &_fbb, ::flatbuffers::Offset< tt::target::EventRef > ref=0)
Definition: command_generated.h:821
inline ::flatbuffers::Offset< EnqueueProgramCommand > CreateEnqueueProgramCommand(::flatbuffers::FlatBufferBuilder &_fbb, ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset< tt::target::TensorRef >>> operands=0, ::flatbuffers::Offset< tt::target::metal::ProgramDesc > program=0)
Definition: command_generated.h:288
const char * EnumNameHostBuffer(HostBuffer e)
Definition: command_generated.h:103
const HostBuffer(& EnumValuesHostBuffer())[5]
Definition: command_generated.h:80
inline ::flatbuffers::Offset< ConstantBuffer16 > CreateConstantBuffer16Direct(::flatbuffers::FlatBufferBuilder &_fbb, const std::vector< uint16_t > *data=nullptr)
Definition: command_generated.h:419
inline ::flatbuffers::Offset< ConstantBuffer32 > CreateConstantBuffer32Direct(::flatbuffers::FlatBufferBuilder &_fbb, const std::vector< uint32_t > *data=nullptr)
Definition: command_generated.h:476
inline ::flatbuffers::Offset< CommandQueue > CreateCommandQueueDirect(::flatbuffers::FlatBufferBuilder &_fbb, const char *name=nullptr, const std::vector<::flatbuffers::Offset< tt::target::metal::Command >> *commands=nullptr)
Definition: command_generated.h:1233
bool VerifyHostBuffer(::flatbuffers::Verifier &verifier, const void *obj, HostBuffer type)
Definition: command_generated.h:1245
inline ::flatbuffers::Offset< ConstantBuffer16 > CreateConstantBuffer16(::flatbuffers::FlatBufferBuilder &_fbb, ::flatbuffers::Offset<::flatbuffers::Vector< uint16_t >> data=0)
Definition: command_generated.h:406
inline ::flatbuffers::Offset< FinishCommand > CreateFinishCommand(::flatbuffers::FlatBufferBuilder &_fbb)
Definition: command_generated.h:1002
inline ::flatbuffers::Offset< CreateEventCommand > CreateCreateEventCommand(::flatbuffers::FlatBufferBuilder &_fbb, ::flatbuffers::Offset< tt::target::EventRef > ref=0)
Definition: command_generated.h:773
Definition: debug_info_generated.h:18
Definition: debug_info_generated.h:36
Definition: command_generated.h:1119
::flatbuffers::FlatBufferBuilder & fbb_
Definition: command_generated.h:1121
::flatbuffers::uoffset_t start_
Definition: command_generated.h:1122
::flatbuffers::Offset< Command > Finish()
Definition: command_generated.h:1136
void add_debug_info(::flatbuffers::Offset<::flatbuffers::String > debug_info)
Definition: command_generated.h:1129
CommandBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
Definition: command_generated.h:1132
void add_type(::flatbuffers::Offset< void > type)
Definition: command_generated.h:1126
void add_type_type(tt::target::metal::CommandType type_type)
Definition: command_generated.h:1123
Command Table
Definition: command_generated.h:1120
Definition: command_generated.h:1197
::flatbuffers::FlatBufferBuilder & fbb_
Definition: command_generated.h:1199
::flatbuffers::uoffset_t start_
Definition: command_generated.h:1200
CommandQueueBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
Definition: command_generated.h:1207
CommandQueue Table
Definition: command_generated.h:1198
void add_commands(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset< tt::target::metal::Command >>> commands)
Definition: command_generated.h:1204
void add_name(::flatbuffers::Offset<::flatbuffers::String > name)
Definition: command_generated.h:1201
::flatbuffers::Offset< CommandQueue > Finish()
Definition: command_generated.h:1211
Definition: command_generated.h:1228
static constexpr auto Create
Definition: command_generated.h:1230
CommandQueue type
Definition: command_generated.h:1229
Definition: command_generated.h:192
static const CommandType enum_value
Definition: command_generated.h:193
Definition: command_generated.h:1155
static constexpr auto Create
Definition: command_generated.h:1157
Command type
Definition: command_generated.h:1156
Definition: command_generated.h:388
ConstantBuffer16 Table
Definition: command_generated.h:389
::flatbuffers::Offset< ConstantBuffer16 > Finish()
Definition: command_generated.h:399
::flatbuffers::FlatBufferBuilder & fbb_
Definition: command_generated.h:390
ConstantBuffer16Builder(::flatbuffers::FlatBufferBuilder &_fbb)
Definition: command_generated.h:395
void add_data(::flatbuffers::Offset<::flatbuffers::Vector< uint16_t >> data)
Definition: command_generated.h:392
::flatbuffers::uoffset_t start_
Definition: command_generated.h:391
Definition: command_generated.h:414
static constexpr auto Create
Definition: command_generated.h:416
ConstantBuffer16 type
Definition: command_generated.h:415
Definition: command_generated.h:445
ConstantBuffer32 Table
Definition: command_generated.h:446
::flatbuffers::Offset< ConstantBuffer32 > Finish()
Definition: command_generated.h:456
ConstantBuffer32Builder(::flatbuffers::FlatBufferBuilder &_fbb)
Definition: command_generated.h:452
::flatbuffers::uoffset_t start_
Definition: command_generated.h:448
::flatbuffers::FlatBufferBuilder & fbb_
Definition: command_generated.h:447
void add_data(::flatbuffers::Offset<::flatbuffers::Vector< uint32_t >> data)
Definition: command_generated.h:449
Definition: command_generated.h:471
ConstantBuffer32 type
Definition: command_generated.h:472
static constexpr auto Create
Definition: command_generated.h:473
Definition: command_generated.h:331
::flatbuffers::Offset< ConstantBuffer8 > Finish()
Definition: command_generated.h:342
::flatbuffers::uoffset_t start_
Definition: command_generated.h:334
ConstantBuffer8 Table
Definition: command_generated.h:332
void add_data(::flatbuffers::Offset<::flatbuffers::Vector< uint8_t >> data)
Definition: command_generated.h:335
::flatbuffers::FlatBufferBuilder & fbb_
Definition: command_generated.h:333
ConstantBuffer8Builder(::flatbuffers::FlatBufferBuilder &_fbb)
Definition: command_generated.h:338
Definition: command_generated.h:357
static constexpr auto Create
Definition: command_generated.h:359
ConstantBuffer8 type
Definition: command_generated.h:358
Definition: command_generated.h:659
::flatbuffers::FlatBufferBuilder & fbb_
Definition: command_generated.h:661
void add_ref(::flatbuffers::Offset< tt::target::TensorRef > ref)
Definition: command_generated.h:663
::flatbuffers::uoffset_t start_
Definition: command_generated.h:662
::flatbuffers::Offset< CreateBufferCommand > Finish()
Definition: command_generated.h:670
CreateBufferCommandBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
Definition: command_generated.h:666
CreateBufferCommand Table
Definition: command_generated.h:660
Definition: command_generated.h:685
CreateBufferCommand type
Definition: command_generated.h:686
static constexpr auto Create
Definition: command_generated.h:687
Definition: command_generated.h:755
CreateEventCommand Table
Definition: command_generated.h:756
::flatbuffers::FlatBufferBuilder & fbb_
Definition: command_generated.h:757
void add_ref(::flatbuffers::Offset< tt::target::EventRef > ref)
Definition: command_generated.h:759
CreateEventCommandBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
Definition: command_generated.h:762
::flatbuffers::uoffset_t start_
Definition: command_generated.h:758
::flatbuffers::Offset< CreateEventCommand > Finish()
Definition: command_generated.h:766
Definition: command_generated.h:781
static constexpr auto Create
Definition: command_generated.h:783
CreateEventCommand type
Definition: command_generated.h:782
Definition: command_generated.h:707
::flatbuffers::FlatBufferBuilder & fbb_
Definition: command_generated.h:709
void add_ref(::flatbuffers::Offset< tt::target::TensorRef > ref)
Definition: command_generated.h:711
DeallocateBufferCommand Table
Definition: command_generated.h:708
::flatbuffers::uoffset_t start_
Definition: command_generated.h:710
::flatbuffers::Offset< DeallocateBufferCommand > Finish()
Definition: command_generated.h:718
DeallocateBufferCommandBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
Definition: command_generated.h:714
Definition: command_generated.h:733
static constexpr auto Create
Definition: command_generated.h:735
DeallocateBufferCommand type
Definition: command_generated.h:734
Definition: command_generated.h:267
void add_program(::flatbuffers::Offset< tt::target::metal::ProgramDesc > program)
Definition: command_generated.h:274
EnqueueProgramCommand Table
Definition: command_generated.h:268
EnqueueProgramCommandBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
Definition: command_generated.h:277
void add_operands(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset< tt::target::TensorRef >>> operands)
Definition: command_generated.h:271
::flatbuffers::Offset< EnqueueProgramCommand > Finish()
Definition: command_generated.h:281
::flatbuffers::FlatBufferBuilder & fbb_
Definition: command_generated.h:269
::flatbuffers::uoffset_t start_
Definition: command_generated.h:270
Definition: command_generated.h:298
static constexpr auto Create
Definition: command_generated.h:300
EnqueueProgramCommand type
Definition: command_generated.h:299
Definition: command_generated.h:606
void add_dst(::flatbuffers::Offset< tt::target::TensorRef > dst)
Definition: command_generated.h:613
::flatbuffers::FlatBufferBuilder & fbb_
Definition: command_generated.h:608
::flatbuffers::Offset< EnqueueReadBufferCommand > Finish()
Definition: command_generated.h:620
EnqueueReadBufferCommand Table
Definition: command_generated.h:607
void add_src(::flatbuffers::Offset< tt::target::TensorRef > src)
Definition: command_generated.h:610
EnqueueReadBufferCommandBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
Definition: command_generated.h:616
::flatbuffers::uoffset_t start_
Definition: command_generated.h:609
Definition: command_generated.h:637
static constexpr auto Create
Definition: command_generated.h:639
EnqueueReadBufferCommand type
Definition: command_generated.h:638
Definition: command_generated.h:803
::flatbuffers::FlatBufferBuilder & fbb_
Definition: command_generated.h:805
::flatbuffers::uoffset_t start_
Definition: command_generated.h:806
EnqueueRecordEventCommandBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
Definition: command_generated.h:810
EnqueueRecordEventCommand Table
Definition: command_generated.h:804
void add_ref(::flatbuffers::Offset< tt::target::EventRef > ref)
Definition: command_generated.h:807
::flatbuffers::Offset< EnqueueRecordEventCommand > Finish()
Definition: command_generated.h:814
Definition: command_generated.h:829
static constexpr auto Create
Definition: command_generated.h:831
EnqueueRecordEventCommand type
Definition: command_generated.h:830
Definition: command_generated.h:851
EnqueueWaitForEventCommandBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
Definition: command_generated.h:858
EnqueueWaitForEventCommand Table
Definition: command_generated.h:852
::flatbuffers::Offset< EnqueueWaitForEventCommand > Finish()
Definition: command_generated.h:862
void add_ref(::flatbuffers::Offset< tt::target::EventRef > ref)
Definition: command_generated.h:855
::flatbuffers::FlatBufferBuilder & fbb_
Definition: command_generated.h:853
::flatbuffers::uoffset_t start_
Definition: command_generated.h:854
EnqueueWaitForEventCommand type
Definition: command_generated.h:878
static constexpr auto Create
Definition: command_generated.h:879
Definition: command_generated.h:542
void add_dst(::flatbuffers::Offset< tt::target::TensorRef > dst)
Definition: command_generated.h:552
void add_src_type(tt::target::metal::HostBuffer src_type)
Definition: command_generated.h:546
void add_src(::flatbuffers::Offset< void > src)
Definition: command_generated.h:549
::flatbuffers::uoffset_t start_
Definition: command_generated.h:545
EnqueueWriteBufferCommandBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
Definition: command_generated.h:555
::flatbuffers::Offset< EnqueueWriteBufferCommand > Finish()
Definition: command_generated.h:559
::flatbuffers::FlatBufferBuilder & fbb_
Definition: command_generated.h:544
EnqueueWriteBufferCommand Table
Definition: command_generated.h:543
Definition: command_generated.h:578
static constexpr auto Create
Definition: command_generated.h:580
EnqueueWriteBufferCommand type
Definition: command_generated.h:579
Definition: command_generated.h:947
EventQueryCommand Table
Definition: command_generated.h:948
EventQueryCommandBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
Definition: command_generated.h:954
::flatbuffers::FlatBufferBuilder & fbb_
Definition: command_generated.h:949
::flatbuffers::uoffset_t start_
Definition: command_generated.h:950
void add_ref(::flatbuffers::Offset< tt::target::EventRef > ref)
Definition: command_generated.h:951
::flatbuffers::Offset< EventQueryCommand > Finish()
Definition: command_generated.h:958
Definition: command_generated.h:973
static constexpr auto Create
Definition: command_generated.h:975
EventQueryCommand type
Definition: command_generated.h:974
Definition: command_generated.h:899
::flatbuffers::Offset< EventSynchronizeCommand > Finish()
Definition: command_generated.h:910
EventSynchronizeCommand Table
Definition: command_generated.h:900
EventSynchronizeCommandBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
Definition: command_generated.h:906
::flatbuffers::FlatBufferBuilder & fbb_
Definition: command_generated.h:901
void add_ref(::flatbuffers::Offset< tt::target::EventRef > ref)
Definition: command_generated.h:903
::flatbuffers::uoffset_t start_
Definition: command_generated.h:902
Definition: command_generated.h:925
static constexpr auto Create
Definition: command_generated.h:927
EventSynchronizeCommand type
Definition: command_generated.h:926
Definition: binary_generated.h:37
const tt::target::TensorRef * ref() const
Definition: command_generated.h:648
bool Verify(::flatbuffers::Verifier &verifier) const
Definition: command_generated.h:256
const tt::target::TensorRef * src() const
Definition: command_generated.h:590
const tt::target::metal::ConstantBuffer32 * src_as_ConstantBuffer32() const
Definition: command_generated.h:509
CommandQueueBuilder Builder
Definition: command_generated.h:1174
const ::flatbuffers::Vector< uint32_t > * data() const
Definition: command_generated.h:434
const tt::target::metal::ConstantBuffer8 * src_as_ConstantBuffer8() const
Definition: command_generated.h:503
FinishCommandBuilder Builder
Definition: command_generated.h:979
const tt::target::metal::EventQueryCommand * type_as_EventQueryCommand() const
Definition: command_generated.h:1055
const ::flatbuffers::Vector<::flatbuffers::Offset< tt::target::metal::Command > > * commands() const
Definition: command_generated.h:1183
tt::target::metal::HostBuffer src_type() const
Definition: command_generated.h:493
const tt::target::EventRef * ref() const
Definition: command_generated.h:744
DeallocateBufferCommandBuilder Builder
Definition: command_generated.h:691
EventQueryCommandBuilder Builder
Definition: command_generated.h:931
tt::target::metal::CommandType type_type() const
Definition: command_generated.h:1021
const tt::target::metal::FinishCommand * type_as_FinishCommand() const
Definition: command_generated.h:1058
const tt::target::TensorRef * src_as_TensorRef() const
Definition: command_generated.h:500
ConstantBuffer32Builder Builder
Definition: command_generated.h:429
CreateBufferCommandBuilder Builder
Definition: command_generated.h:643
ConstantBuffer8Builder Builder
Definition: command_generated.h:315
const tt::target::metal::DeallocateBufferCommand * type_as_DeallocateBufferCommand() const
Definition: command_generated.h:1040
EnqueueWaitForEventCommandBuilder Builder
Definition: command_generated.h:835
const tt::target::metal::EnqueueWriteBufferCommand * type_as_EnqueueWriteBufferCommand() const
Definition: command_generated.h:1031
const tt::target::metal::CreateEventCommand * type_as_CreateEventCommand() const
Definition: command_generated.h:1043
ConstantBuffer16Builder Builder
Definition: command_generated.h:372
EnqueueProgramCommandBuilder Builder
Definition: command_generated.h:244
const tt::target::metal::EventSynchronizeCommand * type_as_EventSynchronizeCommand() const
Definition: command_generated.h:1052
const ::flatbuffers::String * debug_info() const
Definition: command_generated.h:1061
CreateEventCommandBuilder Builder
Definition: command_generated.h:739
const ::flatbuffers::Vector<::flatbuffers::Offset< tt::target::TensorRef > > * operands() const
Definition: command_generated.h:250
EnqueueWriteBufferCommandBuilder Builder
Definition: command_generated.h:486
const tt::target::TensorRef * dst() const
Definition: command_generated.h:512
EventSynchronizeCommandBuilder Builder
Definition: command_generated.h:883
const tt::target::metal::EnqueueWaitForEventCommand * type_as_EnqueueWaitForEventCommand() const
Definition: command_generated.h:1049
const tt::target::metal::EnqueueProgramCommand * type_as_EnqueueProgramCommand() const
Definition: command_generated.h:1028
const ::flatbuffers::String * name() const
Definition: command_generated.h:1180
EnqueueRecordEventCommandBuilder Builder
Definition: command_generated.h:787
const tt::target::metal::EnqueueRecordEventCommand * type_as_EnqueueRecordEventCommand() const
Definition: command_generated.h:1046
const tt::target::metal::CreateBufferCommand * type_as_CreateBufferCommand() const
Definition: command_generated.h:1037
const tt::target::metal::EnqueueReadBufferCommand * type_as_EnqueueReadBufferCommand() const
Definition: command_generated.h:1034
EnqueueReadBufferCommandBuilder Builder
Definition: command_generated.h:584
const ::flatbuffers::Vector< uint16_t > * data() const
Definition: command_generated.h:377
const void * type() const
Definition: command_generated.h:1024
const ::flatbuffers::Vector< uint8_t > * data() const
Definition: command_generated.h:320
const tt::target::metal::ProgramDesc * program() const
Definition: command_generated.h:253
const tt::target::metal::ConstantBuffer16 * src_as_ConstantBuffer16() const
Definition: command_generated.h:506
const void * src() const
Definition: command_generated.h:496
CommandBuilder Builder
Definition: command_generated.h:1014
Definition: command_generated.h:987
FinishCommandBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
Definition: command_generated.h:991
::flatbuffers::uoffset_t start_
Definition: command_generated.h:990
FinishCommand Table
Definition: command_generated.h:988
::flatbuffers::FlatBufferBuilder & fbb_
Definition: command_generated.h:989
::flatbuffers::Offset< FinishCommand > Finish()
Definition: command_generated.h:995
Definition: command_generated.h:1008
FinishCommand type
Definition: command_generated.h:1009
static constexpr auto Create
Definition: command_generated.h:1010
Definition: command_generated.h:109
static const HostBuffer enum_value
Definition: command_generated.h:110