tvm
Loading...
Searching...
No Matches
doc.h
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
23#ifndef TVM_SCRIPT_PRINTER_DOC_H_
24#define TVM_SCRIPT_PRINTER_DOC_H_
25
26#include <tvm/ffi/dtype.h>
27#include <tvm/ffi/reflection/access_path.h>
28#include <tvm/ffi/reflection/registry.h>
29#include <tvm/ir/expr.h>
30#include <tvm/ir/type.h>
32
33#include <string>
34
35namespace tvm {
36namespace script {
37namespace printer {
38
39using AccessPath = ffi::reflection::AccessPath;
40
52class DocObj : public ffi::Object {
53 public:
61 mutable ffi::Array<AccessPath> source_paths;
62
63 static void RegisterReflection() {
64 namespace refl = tvm::ffi::reflection;
65 refl::ObjectDef<DocObj>().def_rw("source_paths", &DocObj::source_paths);
66 }
67
68 static constexpr bool _type_mutable = true;
69
70 TVM_FFI_DECLARE_OBJECT_INFO("script.printer.Doc", DocObj, ffi::Object);
71};
72
78class Doc : public ffi::ObjectRef {
79 protected:
80 Doc() = default;
81
82 public:
84};
85
86class ExprDoc;
87
93class ExprDocObj : public DocObj {
94 public:
99 TVM_TIRX_DLL ExprDoc Attr(ffi::String attr) const;
100
105 TVM_TIRX_DLL ExprDoc operator[](ffi::Array<Doc> indices) const;
106
111 TVM_TIRX_DLL ExprDoc Call(ffi::Array<ExprDoc, void> args) const;
112
119 TVM_TIRX_DLL ExprDoc Call(ffi::Array<ExprDoc, void> args, //
120 ffi::Array<ffi::String> kwargs_keys, //
121 ffi::Array<ExprDoc, void> kwargs_values) const;
122
123 static void RegisterReflection() {
124 namespace refl = tvm::ffi::reflection;
125 refl::ObjectDef<ExprDocObj>();
126 }
127 TVM_FFI_DECLARE_OBJECT_INFO("script.printer.ExprDoc", ExprDocObj, DocObj);
128};
129
135class ExprDoc : public Doc {
136 protected:
137 ExprDoc() = default;
138
139 public:
144 TVM_TIRX_DLL ExprDoc operator[](ffi::Array<Doc> indices) const;
145
146 explicit ExprDoc(ffi::ObjectPtr<ExprDocObj> data) : Doc(ffi::UnsafeInit{}) {
147 TVM_FFI_ICHECK(data != nullptr);
148 data_ = std::move(data);
149 }
150
152};
153
159class StmtDocObj : public DocObj {
160 public:
169 mutable ffi::Optional<ffi::String> comment{std::nullopt};
170
171 static void RegisterReflection() {
172 namespace refl = tvm::ffi::reflection;
173 refl::ObjectDef<StmtDocObj>().def_rw("comment", &StmtDocObj::comment);
174 }
175 TVM_FFI_DECLARE_OBJECT_INFO("script.printer.StmtDoc", StmtDocObj, DocObj);
176};
177
183class StmtDoc : public Doc {
184 protected:
185 StmtDoc() = default;
186
187 public:
189};
190
197class StmtBlockDocObj : public DocObj {
198 public:
200 ffi::Array<StmtDoc> stmts;
201
202 static void RegisterReflection() {
203 namespace refl = tvm::ffi::reflection;
204 refl::ObjectDef<StmtBlockDocObj>().def_ro("stmts", &StmtBlockDocObj::stmts);
205 }
207};
208
213class StmtBlockDoc : public Doc {
214 public:
219 TVM_TIRX_DLL explicit StmtBlockDoc(ffi::Array<StmtDoc> stmts);
221};
222
228class LiteralDocObj : public ExprDocObj {
229 public:
239 ffi::Any value;
240
241 static void RegisterReflection() {
242 namespace refl = tvm::ffi::reflection;
243 refl::ObjectDef<LiteralDocObj>().def_ro("value", &LiteralDocObj::value);
244 }
246};
247
253class LiteralDoc : public ExprDoc {
254 protected:
255 TVM_TIRX_DLL explicit LiteralDoc(ffi::Any value, const ffi::Optional<AccessPath>& object_path);
256
257 public:
262 static LiteralDoc None(const ffi::Optional<AccessPath>& p) {
263 return LiteralDoc(ffi::Any(nullptr), p);
264 }
270 static LiteralDoc Int(int64_t v, const ffi::Optional<AccessPath>& p) {
271 return LiteralDoc(IntImm::Int64(v), p);
272 }
273
280 static LiteralDoc Int(IntImm v, const ffi::Optional<AccessPath>& p) {
281 return LiteralDoc(std::move(v), p);
282 }
288 static LiteralDoc Boolean(bool v, const ffi::Optional<AccessPath>& p) {
289 return LiteralDoc(IntImm::Bool(v), p);
290 }
296 static LiteralDoc Float(double v, const ffi::Optional<AccessPath>& p) {
297 return LiteralDoc(FloatImm(PrimType::Float(64), v), p);
298 }
304 static LiteralDoc Str(const ffi::String& v, const ffi::Optional<AccessPath>& p) {
305 return LiteralDoc(v, p);
306 }
312 static LiteralDoc DataType(DLDataType v, const ffi::Optional<AccessPath>& p) {
313 std::string dtype =
314 v == DLDataType{kDLOpaqueHandle, 0, 0} ? "void" : ffi::DLDataTypeToString(v);
315 return LiteralDoc::Str(dtype, p);
316 }
322 static LiteralDoc Device(const DLDevice& v, const ffi::Optional<AccessPath>& p) {
323 std::ostringstream os;
324 runtime::operator<<(os, v);
325 return LiteralDoc::Str(os.str(), p);
326 }
327
329};
330
337 public:
339 ExprDoc value{ffi::UnsafeInit()};
340
341 static void RegisterReflection() {
342 namespace refl = tvm::ffi::reflection;
343 refl::ObjectDef<ExprStringDocObj>().def_ro("value", &ExprStringDocObj::value);
344 }
346};
347
353class ExprStringDoc : public ExprDoc {
354 public:
360 TVM_TIRX_DLL explicit ExprStringDoc(ExprDoc value, const ffi::Optional<AccessPath>& object_path);
361
363};
364
370class IdDocObj : public ExprDocObj {
371 public:
373 ffi::String name;
374
375 static void RegisterReflection() {
376 namespace refl = tvm::ffi::reflection;
377 refl::ObjectDef<IdDocObj>().def_ro("name", &IdDocObj::name);
378 }
380};
381
387class IdDoc : public ExprDoc {
388 public:
393 TVM_TIRX_DLL explicit IdDoc(ffi::String name);
394 explicit IdDoc(std::nullptr_t) : ExprDoc(nullptr) {}
396};
397
404 public:
406 ExprDoc value{ffi::UnsafeInit()};
408 ffi::String name;
409
410 static void RegisterReflection() {
411 namespace refl = tvm::ffi::reflection;
412 refl::ObjectDef<AttrAccessDocObj>()
413 .def_ro("value", &AttrAccessDocObj::value)
414 .def_ro("name", &AttrAccessDocObj::name);
415 }
417};
418
434
440class IndexDocObj : public ExprDocObj {
441 public:
443 ExprDoc value{ffi::UnsafeInit()};
451 ffi::Array<Doc> indices; // Each element is union of: Slice / ExprDoc
452
453 static void RegisterReflection() {
454 namespace refl = tvm::ffi::reflection;
455 refl::ObjectDef<IndexDocObj>()
456 .def_ro("value", &IndexDocObj::value)
457 .def_ro("indices", &IndexDocObj::indices);
458 }
460};
461
467class IndexDoc : public ExprDoc {
468 public:
474 TVM_TIRX_DLL explicit IndexDoc(ExprDoc value, ffi::Array<Doc> indices);
476};
477
483class CallDocObj : public ExprDocObj {
484 public:
486 ExprDoc callee{ffi::UnsafeInit()};
488 ffi::Array<ExprDoc> args;
490 ffi::Array<ffi::String> kwargs_keys;
497 ffi::Array<ExprDoc> kwargs_values;
498
499 static void RegisterReflection() {
500 namespace refl = tvm::ffi::reflection;
501 refl::ObjectDef<CallDocObj>()
502 .def_ro("callee", &CallDocObj::callee)
503 .def_ro("args", &CallDocObj::args)
504 .def_ro("kwargs_keys", &CallDocObj::kwargs_keys)
505 .def_ro("kwargs_values", &CallDocObj::kwargs_values);
506 }
508};
509
515class CallDoc : public ExprDoc {
516 public:
524 TVM_TIRX_DLL CallDoc(ExprDoc callee, ffi::Array<ExprDoc> args,
525 ffi::Array<ffi::String> kwargs_keys, ffi::Array<ExprDoc> kwargs_values);
527};
528
538 public:
539 enum class Kind : int32_t {
540 // Unary operators
541 kUnaryStart = 0,
542 kUSub = 1, // -x
543 kInvert = 2, // ~x
544 kNot = 3, // not x
545 kUnaryEnd = 4,
546
547 // Binary operators
548 kBinaryStart = 5,
549 kAdd = 6, // +
550 kSub = 7, // -
551 kMult = 8, // *
552 kDiv = 9, // /
553 kFloorDiv = 10, // // in Python
554 kMod = 11, // % in Python
555 kPow = 12, // ** in Python
556 kLShift = 13, // <<
557 kRShift = 14, // >>
558 kBitAnd = 15, // &
559 kBitOr = 16, // |
560 kBitXor = 17, // ^
561 kLt = 18, // <
562 kLtE = 19, // <=
563 kEq = 20, // ==
564 kNotEq = 21, // !=
565 kGt = 22, // >
566 kGtE = 23, // >=
567 kAnd = 24, // and
568 kOr = 25, // or
569 kMatMul = 26, // @
570 kBinaryEnd = 27,
571
572 // Special
573 kSpecialStart = 28,
574 kIfThenElse = 29, // <operands[1]> if <operands[0]> else <operands[2]>
575 kSpecialEnd = 30
576 };
577
581 ffi::Array<ExprDoc> operands;
582
583 static void RegisterReflection() {
584 namespace refl = tvm::ffi::reflection;
585 refl::ObjectDef<OperationDocObj>()
586 .def_ro("kind", &OperationDocObj::kind)
587 .def_ro("operands", &OperationDocObj::operands);
588 }
590};
591
607
616class LambdaDocObj : public ExprDocObj {
617 public:
619 ffi::Array<IdDoc> args;
621 ExprDoc body{ffi::UnsafeInit()};
622
623 static void RegisterReflection() {
624 namespace refl = tvm::ffi::reflection;
625 refl::ObjectDef<LambdaDocObj>()
626 .def_ro("args", &LambdaDocObj::args)
627 .def_ro("body", &LambdaDocObj::body);
628 }
630};
631
637class LambdaDoc : public ExprDoc {
638 public:
644 TVM_TIRX_DLL explicit LambdaDoc(ffi::Array<IdDoc> args, ExprDoc body);
646};
647
653class TupleDocObj : public ExprDocObj {
654 public:
656 ffi::Array<ExprDoc> elements;
657
658 static void RegisterReflection() {
659 namespace refl = tvm::ffi::reflection;
660 refl::ObjectDef<TupleDocObj>().def_ro("elements", &TupleDocObj::elements);
661 }
663};
664
670class TupleDoc : public ExprDoc {
671 public:
675 TupleDoc() : ExprDoc(ffi::make_object<TupleDocObj>()) {}
680 TVM_TIRX_DLL explicit TupleDoc(ffi::Array<ExprDoc> elements);
682};
683
689class ListDocObj : public ExprDocObj {
690 public:
692 ffi::Array<ExprDoc> elements;
693
694 static void RegisterReflection() {
695 namespace refl = tvm::ffi::reflection;
696 refl::ObjectDef<ListDocObj>().def_ro("elements", &ListDocObj::elements);
697 }
699};
700
706class ListDoc : public ExprDoc {
707 public:
711 ListDoc() : ExprDoc(ffi::make_object<ListDocObj>()) {}
716 TVM_TIRX_DLL explicit ListDoc(ffi::Array<ExprDoc> elements);
718};
719
725class DictDocObj : public ExprDocObj {
726 public:
728 ffi::Array<ExprDoc> keys;
735 ffi::Array<ExprDoc> values;
736
737 static void RegisterReflection() {
738 namespace refl = tvm::ffi::reflection;
739 refl::ObjectDef<DictDocObj>()
740 .def_ro("keys", &DictDocObj::keys)
741 .def_ro("values", &DictDocObj::values);
742 }
744};
745
751class DictDoc : public ExprDoc {
752 public:
756 DictDoc() : ExprDoc(ffi::make_object<DictDocObj>()) {}
762 TVM_TIRX_DLL explicit DictDoc(ffi::Array<ExprDoc> keys, ffi::Array<ExprDoc> values);
764};
765
773class SliceDocObj : public DocObj {
774 public:
776 ffi::Optional<ExprDoc> start;
778 ffi::Optional<ExprDoc> stop;
780 ffi::Optional<ExprDoc> step;
781
782 static void RegisterReflection() {
783 namespace refl = tvm::ffi::reflection;
784 refl::ObjectDef<SliceDocObj>()
785 .def_ro("start", &SliceDocObj::start)
786 .def_ro("stop", &SliceDocObj::stop)
787 .def_ro("step", &SliceDocObj::step);
788 }
790};
791
797class SliceDoc : public Doc {
798 public:
805 TVM_TIRX_DLL explicit SliceDoc(ffi::Optional<ExprDoc> start, ffi::Optional<ExprDoc> stop,
806 ffi::Optional<ExprDoc> step);
808};
809
815class AssignDocObj : public StmtDocObj {
816 public:
818 ExprDoc lhs{ffi::UnsafeInit()};
824 ffi::Optional<ExprDoc> rhs;
826 ffi::Optional<ExprDoc> annotation;
827
828 static void RegisterReflection() {
829 namespace refl = tvm::ffi::reflection;
830 refl::ObjectDef<AssignDocObj>()
831 .def_ro("lhs", &AssignDocObj::lhs)
832 .def_ro("rhs", &AssignDocObj::rhs)
833 .def_ro("annotation", &AssignDocObj::annotation);
834 }
836};
837
843class AssignDoc : public StmtDoc {
844 public:
851 TVM_TIRX_DLL explicit AssignDoc(ExprDoc lhs, ffi::Optional<ExprDoc> rhs,
852 ffi::Optional<ExprDoc> annotation);
854};
855
861class IfDocObj : public StmtDocObj {
862 public:
864 ExprDoc predicate{ffi::UnsafeInit()};
866 ffi::Array<StmtDoc> then_branch;
868 ffi::Optional<ffi::Array<StmtDoc>> else_branch;
869
870 static void RegisterReflection() {
871 namespace refl = tvm::ffi::reflection;
872 refl::ObjectDef<IfDocObj>()
873 .def_ro("predicate", &IfDocObj::predicate)
874 .def_ro("then_branch", &IfDocObj::then_branch)
875 .def_ro("else_branch", &IfDocObj::else_branch);
876 }
878};
879
885class IfDoc : public StmtDoc {
886 public:
893 TVM_TIRX_DLL explicit IfDoc(ExprDoc predicate, ffi::Array<StmtDoc> then_branch,
894 ffi::Optional<ffi::Array<StmtDoc>> else_branch);
896};
897
903class WhileDocObj : public StmtDocObj {
904 public:
906 ExprDoc predicate{ffi::UnsafeInit()};
908 ffi::Array<StmtDoc> body;
909
910 static void RegisterReflection() {
911 namespace refl = tvm::ffi::reflection;
912 refl::ObjectDef<WhileDocObj>()
913 .def_ro("predicate", &WhileDocObj::predicate)
914 .def_ro("body", &WhileDocObj::body);
915 }
917};
918
924class WhileDoc : public StmtDoc {
925 public:
931 TVM_TIRX_DLL explicit WhileDoc(ExprDoc predicate, ffi::Array<StmtDoc> body);
933};
934
940class BreakDocObj : public StmtDocObj {
941 public:
942 static void RegisterReflection() {
943 namespace refl = tvm::ffi::reflection;
944 refl::ObjectDef<BreakDocObj>();
945 }
946
948};
949
963
970 public:
971 static void RegisterReflection() {
972 namespace refl = tvm::ffi::reflection;
973 refl::ObjectDef<ContinueDocObj>();
974 }
975
977};
978
992
1002class ForDocObj : public StmtDocObj {
1003 public:
1005 ExprDoc lhs{ffi::UnsafeInit()};
1007 ExprDoc rhs{ffi::UnsafeInit()};
1009 ffi::Array<StmtDoc> body;
1010
1011 static void RegisterReflection() {
1012 namespace refl = tvm::ffi::reflection;
1013 refl::ObjectDef<ForDocObj>()
1014 .def_ro("lhs", &ForDocObj::lhs)
1015 .def_ro("rhs", &ForDocObj::rhs)
1016 .def_ro("body", &ForDocObj::body);
1017 }
1019};
1020
1026class ForDoc : public StmtDoc {
1027 public:
1034 TVM_TIRX_DLL explicit ForDoc(ExprDoc lhs, ExprDoc rhs, ffi::Array<StmtDoc> body);
1036};
1037
1048class ScopeDocObj : public StmtDocObj {
1049 public:
1051 ffi::Optional<ExprDoc> lhs{std::nullopt};
1053 ExprDoc rhs{ffi::UnsafeInit()};
1055 ffi::Array<StmtDoc> body;
1058
1059 static void RegisterReflection() {
1060 namespace refl = tvm::ffi::reflection;
1061 refl::ObjectDef<ScopeDocObj>()
1062 .def_ro("lhs", &ScopeDocObj::lhs)
1063 .def_ro("rhs", &ScopeDocObj::rhs)
1064 .def_ro("body", &ScopeDocObj::body)
1065 .def_ro("allow_concise_scoping", &ScopeDocObj::allow_concise_scoping);
1066 }
1068};
1069
1075class ScopeDoc : public StmtDoc {
1076 public:
1084 TVM_TIRX_DLL explicit ScopeDoc(ffi::Optional<ExprDoc> lhs, ExprDoc rhs, ffi::Array<StmtDoc> body,
1085 bool allow_concise_scoping = false);
1086
1092 TVM_TIRX_DLL explicit ScopeDoc(ExprDoc rhs, ffi::Array<StmtDoc> body);
1093
1095};
1096
1103 public:
1105 ExprDoc expr{ffi::UnsafeInit()};
1106
1107 static void RegisterReflection() {
1108 namespace refl = tvm::ffi::reflection;
1109 refl::ObjectDef<ExprStmtDocObj>().def_ro("expr", &ExprStmtDocObj::expr);
1110 }
1112};
1113
1128
1134class AssertDocObj : public StmtDocObj {
1135 public:
1137 ExprDoc test{ffi::UnsafeInit()};
1139 ffi::Optional<ExprDoc> msg{std::nullopt};
1140
1141 static void RegisterReflection() {
1142 namespace refl = tvm::ffi::reflection;
1143 refl::ObjectDef<AssertDocObj>()
1144 .def_ro("test", &AssertDocObj::test)
1145 .def_ro("msg", &AssertDocObj::msg);
1146 }
1148};
1149
1155class AssertDoc : public StmtDoc {
1156 public:
1162 TVM_TIRX_DLL explicit AssertDoc(ExprDoc test, ffi::Optional<ExprDoc> msg = std::nullopt);
1164};
1165
1171class ReturnDocObj : public StmtDocObj {
1172 public:
1174 ExprDoc value{ffi::UnsafeInit()};
1175
1176 static void RegisterReflection() {
1177 namespace refl = tvm::ffi::reflection;
1178 refl::ObjectDef<ReturnDocObj>().def_ro("value", &ReturnDocObj::value);
1179 }
1181};
1182
1197
1204 public:
1206 IdDoc name{ffi::UnsafeInit{}};
1214 ffi::Array<AssignDoc> args;
1216 ffi::Array<ExprDoc> decorators;
1218 ffi::Optional<ExprDoc> return_type{std::nullopt};
1220 ffi::Array<StmtDoc> body;
1228 ffi::Array<Doc> type_params;
1229
1230 static void RegisterReflection() {
1231 namespace refl = tvm::ffi::reflection;
1232 refl::ObjectDef<FunctionDocObj>()
1233 .def_ro("name", &FunctionDocObj::name)
1234 .def_ro("args", &FunctionDocObj::args)
1235 .def_ro("decorators", &FunctionDocObj::decorators)
1236 .def_ro("return_type", &FunctionDocObj::return_type)
1237 .def_ro("body", &FunctionDocObj::body)
1238 .def_ro("type_params", &FunctionDocObj::type_params);
1239 }
1241};
1242
1248class FunctionDoc : public StmtDoc {
1249 public:
1259 TVM_TIRX_DLL explicit FunctionDoc(IdDoc name, ffi::Array<AssignDoc> args,
1260 ffi::Array<ExprDoc> decorators,
1261 ffi::Optional<ExprDoc> return_type, ffi::Array<StmtDoc> body,
1262 ffi::Array<Doc> type_params = {});
1264};
1265
1271class ClassDocObj : public StmtDocObj {
1272 public:
1274 IdDoc name{ffi::UnsafeInit{}};
1276 ffi::Array<ExprDoc> decorators;
1278 ffi::Array<StmtDoc> body;
1279
1280 static void RegisterReflection() {
1281 namespace refl = tvm::ffi::reflection;
1282 refl::ObjectDef<ClassDocObj>()
1283 .def_ro("name", &ClassDocObj::name)
1284 .def_ro("decorators", &ClassDocObj::decorators)
1285 .def_ro("body", &ClassDocObj::body);
1286 }
1288};
1289
1295class ClassDoc : public StmtDoc {
1296 public:
1303 TVM_TIRX_DLL explicit ClassDoc(IdDoc name, ffi::Array<ExprDoc> decorators,
1304 ffi::Array<StmtDoc> body);
1306};
1307
1314 public:
1315 static void RegisterReflection() {
1316 namespace refl = tvm::ffi::reflection;
1317 refl::ObjectDef<CommentDocObj>();
1318 }
1320};
1321
1332
1339 public:
1340 static void RegisterReflection() {
1341 namespace refl = tvm::ffi::reflection;
1342 refl::ObjectDef<DocStringDocObj>();
1343 }
1345};
1346
1357
1364 public:
1366 ffi::String canonical_name;
1367
1368 static void RegisterReflection() {
1369 ffi::reflection::ObjectDef<NamespaceDocObj>().def_ro("canonical_name",
1371 }
1373};
1374
1387
1388} // namespace printer
1389} // namespace script
1390} // namespace tvm
1391
1392#endif // TVM_SCRIPT_PRINTER_DOC_H_
Base expr nodes in TVM.
IR/AST nodes for TVM types shared across IR variants.
#define TVM_TIRX_DLL
Definition base.h:55
Managed reference class to FloatImmObj.
Definition expr.h:411
Managed reference class to IntImmObj.
Definition expr.h:331
static IntImm Int64(ffi::BigInt value, Location loc=UnknownLoc())
Construct a scalar int64 constant.
Definition expr.h:374
static IntImm Bool(bool value, Location loc=UnknownLoc())
Construct a scalar boolean constant.
Definition expr.h:351
static TVM_TIRX_DLL PrimType Float(int bits, int lanes=1)
Construct a floating-point type with fixed lanes.
Doc that represents assert statement.
Definition doc.h:1134
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.AssertDoc", AssertDocObj, StmtDocObj)
static void RegisterReflection()
Definition doc.h:1141
ffi::Optional< ExprDoc > msg
The optional error message when assertion failed.
Definition doc.h:1139
ExprDoc test
The expression to test.
Definition doc.h:1137
Reference type of AssertDocObj.
Definition doc.h:1155
TVM_TIRX_DLL AssertDoc(ExprDoc test, ffi::Optional< ExprDoc > msg=std::nullopt)
Constructor of AssertDoc.
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(AssertDoc, StmtDoc, AssertDocObj)
Doc that represents assign statement.
Definition doc.h:815
static void RegisterReflection()
Definition doc.h:828
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.AssignDoc", AssignDocObj, StmtDocObj)
ffi::Optional< ExprDoc > annotation
The type annotation of this assignment.
Definition doc.h:826
ExprDoc lhs
The left hand side of the assignment.
Definition doc.h:818
ffi::Optional< ExprDoc > rhs
The right hand side of the assignment.
Definition doc.h:824
Reference type of AssignDocObj.
Definition doc.h:843
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(AssignDoc, StmtDoc, AssignDocObj)
TVM_TIRX_DLL AssignDoc(ExprDoc lhs, ffi::Optional< ExprDoc > rhs, ffi::Optional< ExprDoc > annotation)
Constructor of AssignDoc.
Doc that represents attribute access on another expression.
Definition doc.h:403
ffi::String name
The attribute to be accessed.
Definition doc.h:408
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.AttrAccessDoc", AttrAccessDocObj, ExprDocObj)
static void RegisterReflection()
Definition doc.h:410
ExprDoc value
The target expression to be accessed.
Definition doc.h:406
Reference type of AttrAccessDocObj.
Definition doc.h:424
TVM_TIRX_DLL AttrAccessDoc(ExprDoc value, ffi::String name)
Constructor of AttrAccessDoc.
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(AttrAccessDoc, ExprDoc, AttrAccessDocObj)
Doc that represents break statement.
Definition doc.h:940
static void RegisterReflection()
Definition doc.h:942
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.BreakDoc", BreakDocObj, StmtDocObj)
Reference type of BreakDocObj.
Definition doc.h:955
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(BreakDoc, StmtDoc, BreakDocObj)
TVM_TIRX_DLL BreakDoc()
Constructor of BreakDoc.
Doc that represents function call.
Definition doc.h:483
ffi::Array< ExprDoc > kwargs_values
The values of keyword arguments.
Definition doc.h:497
ExprDoc callee
The callee of this function call.
Definition doc.h:486
ffi::Array< ffi::String > kwargs_keys
The keys of keyword arguments.
Definition doc.h:490
static void RegisterReflection()
Definition doc.h:499
ffi::Array< ExprDoc > args
The positional arguments.
Definition doc.h:488
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.CallDoc", CallDocObj, ExprDocObj)
Reference type of CallDocObj.
Definition doc.h:515
TVM_TIRX_DLL CallDoc(ExprDoc callee, ffi::Array< ExprDoc > args, ffi::Array< ffi::String > kwargs_keys, ffi::Array< ExprDoc > kwargs_values)
Constructor of CallDoc.
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(CallDoc, ExprDoc, CallDocObj)
Doc that represents class definition.
Definition doc.h:1271
ffi::Array< StmtDoc > body
The body of class.
Definition doc.h:1278
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.ClassDoc", ClassDocObj, StmtDocObj)
ffi::Array< ExprDoc > decorators
Decorators of class.
Definition doc.h:1276
IdDoc name
The name of class.
Definition doc.h:1274
static void RegisterReflection()
Definition doc.h:1280
Reference type of ClassDocObj.
Definition doc.h:1295
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(ClassDoc, StmtDoc, ClassDocObj)
TVM_TIRX_DLL ClassDoc(IdDoc name, ffi::Array< ExprDoc > decorators, ffi::Array< StmtDoc > body)
Constructor of ClassDoc.
Doc that represents comment.
Definition doc.h:1313
static void RegisterReflection()
Definition doc.h:1315
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.CommentDoc", CommentDocObj, StmtDocObj)
Reference type of CommentDocObj.
Definition doc.h:1327
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(CommentDoc, StmtDoc, CommentDocObj)
TVM_TIRX_DLL CommentDoc(ffi::String comment)
Doc that represents continue statement.
Definition doc.h:969
static void RegisterReflection()
Definition doc.h:971
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.ContinueDoc", ContinueDocObj, StmtDocObj)
Reference type of ContinueDocObj.
Definition doc.h:984
TVM_TIRX_DLL ContinueDoc()
Constructor of ContinueDoc.
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(ContinueDoc, StmtDoc, ContinueDocObj)
Doc that represents dictionary literal.
Definition doc.h:725
ffi::Array< ExprDoc > keys
keys of dictionary
Definition doc.h:728
ffi::Array< ExprDoc > values
Values of dictionary.
Definition doc.h:735
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.DictDoc", DictDocObj, ExprDocObj)
static void RegisterReflection()
Definition doc.h:737
Reference type of DictDocObj.
Definition doc.h:751
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(DictDoc, ExprDoc, DictDocObj)
TVM_TIRX_DLL DictDoc(ffi::Array< ExprDoc > keys, ffi::Array< ExprDoc > values)
Constructor of DictDoc.
DictDoc()
Create an empty dictionary.
Definition doc.h:756
The base class of all Doc.
Definition doc.h:52
ffi::Array< AccessPath > source_paths
The list of object paths of the source IR node.
Definition doc.h:61
static constexpr bool _type_mutable
Definition doc.h:68
static void RegisterReflection()
Definition doc.h:63
TVM_FFI_DECLARE_OBJECT_INFO("script.printer.Doc", DocObj, ffi::Object)
Doc that represents docstring.
Definition doc.h:1338
static void RegisterReflection()
Definition doc.h:1340
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.DocStringDoc", DocStringDocObj, StmtDocObj)
Reference type of DocStringDocObj.
Definition doc.h:1352
TVM_TIRX_DLL DocStringDoc(ffi::String docs)
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(DocStringDoc, StmtDoc, DocStringDocObj)
Reference type of DocObj.
Definition doc.h:78
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(Doc, ffi::ObjectRef, DocObj)
The base class of expression doc.
Definition doc.h:93
TVM_TIRX_DLL ExprDoc Call(ffi::Array< ExprDoc, void > args) const
Create a doc representing calling the current ExprDoc.
TVM_TIRX_DLL ExprDoc operator[](ffi::Array< Doc > indices) const
Create a doc representing index access on the current ExprDoc.
TVM_TIRX_DLL ExprDoc Call(ffi::Array< ExprDoc, void > args, ffi::Array< ffi::String > kwargs_keys, ffi::Array< ExprDoc, void > kwargs_values) const
Create a doc representing attribute access on the current ExprDoc.
TVM_TIRX_DLL ExprDoc Attr(ffi::String attr) const
Create a doc representing attribute access on the current ExprDoc.
TVM_FFI_DECLARE_OBJECT_INFO("script.printer.ExprDoc", ExprDocObj, DocObj)
static void RegisterReflection()
Definition doc.h:123
Reference type of ExprDocObj.
Definition doc.h:135
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(ExprDoc, Doc, ExprDocObj)
ExprDoc(ffi::ObjectPtr< ExprDocObj > data)
Definition doc.h:146
TVM_TIRX_DLL ExprDoc operator[](ffi::Array< Doc > indices) const
Create a doc representing index access on the current ExprDoc.
Doc that represents an expression as statement.
Definition doc.h:1102
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.ExprStmtDoc", ExprStmtDocObj, StmtDocObj)
static void RegisterReflection()
Definition doc.h:1107
ExprDoc expr
The expression represented by this doc.
Definition doc.h:1105
Reference type of ExprStmtDocObj.
Definition doc.h:1119
TVM_TIRX_DLL ExprStmtDoc(ExprDoc expr)
Constructor of ExprStmtDoc.
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(ExprStmtDoc, StmtDoc, ExprStmtDocObj)
Doc that renders an expression as a Python string literal.
Definition doc.h:336
ExprDoc value
The expression to render as a string.
Definition doc.h:339
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.ExprStringDoc", ExprStringDocObj, ExprDocObj)
static void RegisterReflection()
Definition doc.h:341
Reference type of ExprStringDocObj.
Definition doc.h:353
TVM_TIRX_DLL ExprStringDoc(ExprDoc value, const ffi::Optional< AccessPath > &object_path)
Constructor of ExprStringDoc.
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(ExprStringDoc, ExprDoc, ExprStringDocObj)
Doc that represents for statement.
Definition doc.h:1002
ffi::Array< StmtDoc > body
The body of the for statement.
Definition doc.h:1009
ExprDoc lhs
The left hand side of the assignment of iterating variable.
Definition doc.h:1005
ExprDoc rhs
The right hand side of the assignment of iterating variable.
Definition doc.h:1007
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.ForDoc", ForDocObj, StmtDocObj)
static void RegisterReflection()
Definition doc.h:1011
Reference type of ForDocObj.
Definition doc.h:1026
TVM_TIRX_DLL ForDoc(ExprDoc lhs, ExprDoc rhs, ffi::Array< StmtDoc > body)
Constructor of ForDoc.
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(ForDoc, StmtDoc, ForDocObj)
Doc that represents function definition.
Definition doc.h:1203
ffi::Array< StmtDoc > body
The body of function.
Definition doc.h:1220
ffi::Array< Doc > type_params
The PEP 695 type parameters of the function.
Definition doc.h:1228
IdDoc name
The name of function.
Definition doc.h:1206
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.FunctionDoc", FunctionDocObj, StmtDocObj)
ffi::Array< ExprDoc > decorators
Decorators of function.
Definition doc.h:1216
static void RegisterReflection()
Definition doc.h:1230
ffi::Array< AssignDoc > args
The arguments of function.
Definition doc.h:1214
ffi::Optional< ExprDoc > return_type
The return type of function.
Definition doc.h:1218
Reference type of FunctionDocObj.
Definition doc.h:1248
TVM_TIRX_DLL FunctionDoc(IdDoc name, ffi::Array< AssignDoc > args, ffi::Array< ExprDoc > decorators, ffi::Optional< ExprDoc > return_type, ffi::Array< StmtDoc > body, ffi::Array< Doc > type_params={})
Constructor of FunctionDoc.
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(FunctionDoc, StmtDoc, FunctionDocObj)
Doc that represents identifier.
Definition doc.h:370
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.IdDoc", IdDocObj, ExprDocObj)
ffi::String name
The name of the identifier.
Definition doc.h:373
static void RegisterReflection()
Definition doc.h:375
Reference type of IdDocObj.
Definition doc.h:387
IdDoc(std::nullptr_t)
Definition doc.h:394
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(IdDoc, ExprDoc, IdDocObj)
TVM_TIRX_DLL IdDoc(ffi::String name)
Constructor of IdDoc.
Doc that represent if-then-else statement.
Definition doc.h:861
ffi::Optional< ffi::Array< StmtDoc > > else_branch
The optional else branch; an empty array represents a present empty branch.
Definition doc.h:868
static void RegisterReflection()
Definition doc.h:870
ExprDoc predicate
The predicate of the if-then-else statement.
Definition doc.h:864
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.IfDoc", IfDocObj, StmtDocObj)
ffi::Array< StmtDoc > then_branch
The then branch of the if-then-else statement.
Definition doc.h:866
Reference type of IfDocObj.
Definition doc.h:885
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(IfDoc, StmtDoc, IfDocObj)
TVM_TIRX_DLL IfDoc(ExprDoc predicate, ffi::Array< StmtDoc > then_branch, ffi::Optional< ffi::Array< StmtDoc > > else_branch)
Constructor of IfDoc.
Doc that represents index access on another expression.
Definition doc.h:440
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.IndexDoc", IndexDocObj, ExprDocObj)
ExprDoc value
The container value to be accessed.
Definition doc.h:443
static void RegisterReflection()
Definition doc.h:453
ffi::Array< Doc > indices
The indices to access.
Definition doc.h:451
Reference type of IndexDocObj.
Definition doc.h:467
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(IndexDoc, ExprDoc, IndexDocObj)
TVM_TIRX_DLL IndexDoc(ExprDoc value, ffi::Array< Doc > indices)
Constructor of IndexDoc.
Doc that represents anonymous function.
Definition doc.h:616
ExprDoc body
The body of this anonymous function.
Definition doc.h:621
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.LambdaDoc", LambdaDocObj, ExprDocObj)
ffi::Array< IdDoc > args
The arguments of this anonymous function.
Definition doc.h:619
static void RegisterReflection()
Definition doc.h:623
Reference type of LambdaDocObj.
Definition doc.h:637
TVM_TIRX_DLL LambdaDoc(ffi::Array< IdDoc > args, ExprDoc body)
Constructor of LambdaDoc.
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(LambdaDoc, ExprDoc, LambdaDocObj)
Doc that represents list literal.
Definition doc.h:689
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.ListDoc", ListDocObj, ExprDocObj)
ffi::Array< ExprDoc > elements
Elements of list.
Definition doc.h:692
static void RegisterReflection()
Definition doc.h:694
Reference type of ListDocObj.
Definition doc.h:706
TVM_TIRX_DLL ListDoc(ffi::Array< ExprDoc > elements)
Constructor of ListDoc.
ListDoc()
Create an empty ListDoc.
Definition doc.h:711
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(ListDoc, ExprDoc, ListDocObj)
Doc that represents literal value.
Definition doc.h:228
static void RegisterReflection()
Definition doc.h:241
ffi::Any value
the internal representation of the literal value.
Definition doc.h:239
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.LiteralDoc", LiteralDocObj, ExprDocObj)
Reference type of LiteralDocObj.
Definition doc.h:253
static LiteralDoc DataType(DLDataType v, const ffi::Optional< AccessPath > &p)
Create a LiteralDoc to represent string.
Definition doc.h:312
static LiteralDoc Boolean(bool v, const ffi::Optional< AccessPath > &p)
Create a LiteralDoc to represent boolean.
Definition doc.h:288
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(LiteralDoc, ExprDoc, LiteralDocObj)
static LiteralDoc Device(const DLDevice &v, const ffi::Optional< AccessPath > &p)
Create a LiteralDoc to represent device.
Definition doc.h:322
TVM_TIRX_DLL LiteralDoc(ffi::Any value, const ffi::Optional< AccessPath > &object_path)
static LiteralDoc Int(IntImm v, const ffi::Optional< AccessPath > &p)
Create an integer literal preserving its typed payload.
Definition doc.h:280
static LiteralDoc Int(int64_t v, const ffi::Optional< AccessPath > &p)
Create a LiteralDoc to represent integer.
Definition doc.h:270
static LiteralDoc Float(double v, const ffi::Optional< AccessPath > &p)
Create a LiteralDoc to represent float.
Definition doc.h:296
static LiteralDoc None(const ffi::Optional< AccessPath > &p)
Create a LiteralDoc to represent None/null/empty value.
Definition doc.h:262
static LiteralDoc Str(const ffi::String &v, const ffi::Optional< AccessPath > &p)
Create a LiteralDoc to represent string.
Definition doc.h:304
A reference to a canonical script namespace.
Definition doc.h:1363
ffi::String canonical_name
The namespace name before alias resolution.
Definition doc.h:1366
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.NamespaceDoc", NamespaceDocObj, ExprDocObj)
static void RegisterReflection()
Definition doc.h:1368
An owning reference to a deferred script namespace.
Definition doc.h:1378
TVM_TIRX_DLL NamespaceDoc(ffi::String canonical_name)
Construct a deferred namespace reference.
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(NamespaceDoc, ExprDoc, NamespaceDocObj)
Doc that represents operation.
Definition doc.h:537
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.OperationDoc", OperationDocObj, ExprDocObj)
ffi::Array< ExprDoc > operands
Operands of this expression.
Definition doc.h:581
Kind kind
The kind of operation (operator)
Definition doc.h:579
static void RegisterReflection()
Definition doc.h:583
Reference type of OperationDocObj.
Definition doc.h:597
TVM_TIRX_DLL OperationDoc(OperationDocObj::Kind kind, ffi::Array< ExprDoc > operands)
Constructor of OperationDoc.
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(OperationDoc, ExprDoc, OperationDocObj)
Doc that represents return statement.
Definition doc.h:1171
static void RegisterReflection()
Definition doc.h:1176
ExprDoc value
The value to return.
Definition doc.h:1174
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.ReturnDoc", ReturnDocObj, StmtDocObj)
Reference type of ReturnDocObj.
Definition doc.h:1188
TVM_TIRX_DLL ReturnDoc(ExprDoc value)
Constructor of ReturnDoc.
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(ReturnDoc, StmtDoc, ReturnDocObj)
Doc that represents special scopes.
Definition doc.h:1048
static void RegisterReflection()
Definition doc.h:1059
ffi::Optional< ExprDoc > lhs
The name of the scoped variable.
Definition doc.h:1051
ffi::Array< StmtDoc > body
The body of the scope doc.
Definition doc.h:1055
bool allow_concise_scoping
Whether a tail-position renderer may spell this scope concisely.
Definition doc.h:1057
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.ScopeDoc", ScopeDocObj, StmtDocObj)
ExprDoc rhs
The value of the scoped variable.
Definition doc.h:1053
Reference type of ScopeDocObj.
Definition doc.h:1075
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(ScopeDoc, StmtDoc, ScopeDocObj)
TVM_TIRX_DLL ScopeDoc(ExprDoc rhs, ffi::Array< StmtDoc > body)
Constructor of ScopeDoc.
TVM_TIRX_DLL ScopeDoc(ffi::Optional< ExprDoc > lhs, ExprDoc rhs, ffi::Array< StmtDoc > body, bool allow_concise_scoping=false)
Constructor of ScopeDoc.
Doc that represents slice in Index expression.
Definition doc.h:773
ffi::Optional< ExprDoc > stop
The exclusive end of slice.
Definition doc.h:778
ffi::Optional< ExprDoc > start
The start of slice.
Definition doc.h:776
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.SliceDoc", SliceDocObj, DocObj)
ffi::Optional< ExprDoc > step
The step of slice.
Definition doc.h:780
static void RegisterReflection()
Definition doc.h:782
Reference type of SliceDocObj.
Definition doc.h:797
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(SliceDoc, Doc, SliceDocObj)
TVM_TIRX_DLL SliceDoc(ffi::Optional< ExprDoc > start, ffi::Optional< ExprDoc > stop, ffi::Optional< ExprDoc > step)
Constructor of SliceDoc.
The container doc that holds a list of StmtDoc.
Definition doc.h:197
ffi::Array< StmtDoc > stmts
The list of statements.
Definition doc.h:200
static void RegisterReflection()
Definition doc.h:202
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.StmtBlockDoc", StmtBlockDocObj, DocObj)
Reference type of StmtBlockDocObj.
Definition doc.h:213
TVM_TIRX_DLL StmtBlockDoc(ffi::Array< StmtDoc > stmts)
Constructor of StmtBlockDoc.
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(StmtBlockDoc, Doc, StmtBlockDocObj)
The base class of statement doc.
Definition doc.h:159
ffi::Optional< ffi::String > comment
The comment of this doc.
Definition doc.h:169
static void RegisterReflection()
Definition doc.h:171
TVM_FFI_DECLARE_OBJECT_INFO("script.printer.StmtDoc", StmtDocObj, DocObj)
Reference type of StmtDocObj.
Definition doc.h:183
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(StmtDoc, Doc, StmtDocObj)
Doc that represents tuple literal.
Definition doc.h:653
static void RegisterReflection()
Definition doc.h:658
ffi::Array< ExprDoc > elements
Elements of tuple.
Definition doc.h:656
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.TupleDoc", TupleDocObj, ExprDocObj)
Reference type of TupleDocObj.
Definition doc.h:670
TVM_TIRX_DLL TupleDoc(ffi::Array< ExprDoc > elements)
Constructor of TupleDoc.
TupleDoc()
Create an empty TupleDoc.
Definition doc.h:675
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(TupleDoc, ExprDoc, TupleDocObj)
Doc that represents while statement.
Definition doc.h:903
ffi::Array< StmtDoc > body
The body of the while statement.
Definition doc.h:908
static void RegisterReflection()
Definition doc.h:910
ExprDoc predicate
The predicate of the while statement.
Definition doc.h:906
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.WhileDoc", WhileDocObj, StmtDocObj)
Reference type of WhileDocObj.
Definition doc.h:924
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(WhileDoc, StmtDoc, WhileDocObj)
TVM_TIRX_DLL WhileDoc(ExprDoc predicate, ffi::Array< StmtDoc > body)
Constructor of WhileDoc.
Abstract device memory management API.
std::ostream & operator<<(std::ostream &os, DLDevice dev)
Definition device_api.h:322
ffi::reflection::AccessPath AccessPath
Definition doc.h:39
An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
Definition analysis.h:41