Commit ca68bef
authored
[Relax][TVMScript] Print ExternFunc struct_info when non-default (#19416)
### Summary
1. Add HasDefaultExternFuncStructInfo helper to detect default
FuncStructInfo for extern functions.
2. Update relax::ExternFunc printer to:
- emit global_symbol using the correct AccessPath attribute key,
- conditionally include struct_info only when it differs from the
default inferred-by-sinfo-args derive function,
- use a variadic args array instead of a single positional literal to
prepare the ExternFunc call.
3. This reduces noisy/redundant output when printing ExternFunc nodes
while preserving explicit struct_info when it conveys meaningful
information.
---------
Co-authored-by: cchung100m <cchung100m@users.noreply.github.com>1 parent 545c332 commit ca68bef
File tree
2 files changed
+50
-2
lines changed- src/script/printer/relax
- tests/python/relax
2 files changed
+50
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
25 | 34 | | |
26 | 35 | | |
27 | 36 | | |
| |||
128 | 137 | | |
129 | 138 | | |
130 | 139 | | |
131 | | - | |
132 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
133 | 146 | | |
134 | 147 | | |
135 | 148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
101 | 136 | | |
102 | 137 | | |
103 | 138 | | |
| |||
0 commit comments