Commit 61ce823
committed
refactor(ffi): always build with bundled tvm-ffi and align include paths
Switch to always using the bundled tvm-ffi submodule for builds. Update
internal include paths and Python imports to match the tvm-ffi submodule
restructure: headers moved from `tvm/ffi/ir/text/` to `tvm/ffi/extra/`
and Python modules from `tvm_ffi.ir.text` to `tvm_ffi.pyast`.
No public API changes. All 99 test suites (19,800 tests) pass.1 parent a7bfc85 commit 61ce823
37 files changed
Lines changed: 3728 additions & 73 deletions
File tree
- 3rdparty
- include/tvm
- ir
- relax
- distributed
- target
- tirx
- python/tvm
- runtime
- script/ir_builder/tirx
- tirx
- src
- ir
- relax
- distributed
- ir
- target
- tirx/ir
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
1 | 12 | | |
2 | 13 | | |
3 | 14 | | |
| |||
- .github/actions/build-orcjit-wheel/action.yml+114
- .github/workflows/ci_test.yml+42
- .github/workflows/publish_orcjit_wheel.yml+83
- .github/workflows/publish_wheel.yml+1-1
- .github/workflows/torch_c_dlpack.yml+1-1
- .gitignore+2
- CMakeLists.txt+5
- addons/ast-testsuit/README.md+87
- addons/ast-testsuit/ast_roundtrip_check.py+179
- addons/ast-testsuit/run_multi_python.sh+54
- addons/tvm_ffi_orcjit/CMakeLists.txt+178
- addons/tvm_ffi_orcjit/ORCJIT_PRIMER.md+535
- addons/tvm_ffi_orcjit/README.md+261
- addons/tvm_ffi_orcjit/examples/quick-start/CMakeLists.txt+67
- addons/tvm_ffi_orcjit/examples/quick-start/README.md+83
- addons/tvm_ffi_orcjit/examples/quick-start/add.cc+46
- addons/tvm_ffi_orcjit/examples/quick-start/add_c.c+59
- addons/tvm_ffi_orcjit/examples/quick-start/run.py+137
- addons/tvm_ffi_orcjit/pyproject.toml+83
- addons/tvm_ffi_orcjit/python/tvm_ffi_orcjit/__init__.py+94
- addons/tvm_ffi_orcjit/python/tvm_ffi_orcjit/_ffi_api.py+21
- addons/tvm_ffi_orcjit/python/tvm_ffi_orcjit/dylib.py+85
- addons/tvm_ffi_orcjit/python/tvm_ffi_orcjit/session.py+90
- addons/tvm_ffi_orcjit/src/ffi/orcjit_dylib.cc+212
- addons/tvm_ffi_orcjit/src/ffi/orcjit_dylib.h+129
- addons/tvm_ffi_orcjit/src/ffi/orcjit_session.cc+696
- addons/tvm_ffi_orcjit/src/ffi/orcjit_session.h+129
- addons/tvm_ffi_orcjit/src/ffi/orcjit_utils.h+90
- addons/tvm_ffi_orcjit/tests/CMakeLists.txt+107
- addons/tvm_ffi_orcjit/tests/README.md+109
- addons/tvm_ffi_orcjit/tests/sources/c/test_call_global.c+106
- addons/tvm_ffi_orcjit/tests/sources/c/test_ctor_dtor.c+152
- addons/tvm_ffi_orcjit/tests/sources/c/test_error.c+31
- addons/tvm_ffi_orcjit/tests/sources/c/test_funcs.c+43
- addons/tvm_ffi_orcjit/tests/sources/c/test_funcs2.c+42
- addons/tvm_ffi_orcjit/tests/sources/c/test_funcs_conflict.c+43
- addons/tvm_ffi_orcjit/tests/sources/c/test_link_order_base.c+33
- addons/tvm_ffi_orcjit/tests/sources/c/test_link_order_caller.c+35
- addons/tvm_ffi_orcjit/tests/sources/c/test_types.c+60
- addons/tvm_ffi_orcjit/tests/sources/cc/test_call_global.cc+37
- addons/tvm_ffi_orcjit/tests/sources/cc/test_ctor_dtor.cc+82
- addons/tvm_ffi_orcjit/tests/sources/cc/test_error.cc+26
- addons/tvm_ffi_orcjit/tests/sources/cc/test_funcs.cc+26
- addons/tvm_ffi_orcjit/tests/sources/cc/test_funcs2.cc+26
- addons/tvm_ffi_orcjit/tests/sources/cc/test_funcs_conflict.cc+26
- addons/tvm_ffi_orcjit/tests/sources/cc/test_link_order_base.cc+24
- addons/tvm_ffi_orcjit/tests/sources/cc/test_link_order_caller.cc+43
- addons/tvm_ffi_orcjit/tests/sources/cc/test_types.cc+33
- addons/tvm_ffi_orcjit/tests/sources/cuda/test_funcs.cu+61
- addons/tvm_ffi_orcjit/tests/test_basic.py+475
- addons/tvm_ffi_orcjit/tests/utils.py+232
- docs/conf.py+3
- include/tvm/ffi/extra/ir_traits.h+802
- include/tvm/ffi/extra/pyast.h+3.3k
- include/tvm/ffi/reflection/registry.h+18
- include/tvm/ffi/string.h+116
- include/tvm/ffi/type_traits.h+6-1
- pyproject.toml+5-3
- python/tvm_ffi/_ast_translator.py+770
- python/tvm_ffi/_ffi_api.py+14
- python/tvm_ffi/cpp/extension.py+210-90
- python/tvm_ffi/cython/type_info.pxi+53
- python/tvm_ffi/dataclasses/py_class.py+22
- python/tvm_ffi/ir_traits.py+337
- python/tvm_ffi/pyast.py+2.5k
- python/tvm_ffi/testing/testing.py+714-5
- python/tvm_ffi/utils/kwargs_wrapper.py+108-80
- src/ffi/extra/ir_traits.cc+351
- src/ffi/extra/pyast_printer.cc+2.0k
- src/ffi/extra/pyast_trait_print.cc+1.4k
- tests/lint/check_file_type.py+1
- tests/python/test_build.py+1-1
- tests/python/test_build_inline.py+71
- tests/python/test_dataclass_copy.py-3
- tests/python/test_dataclass_init.py+3-3
- tests/python/test_dataclass_py_class.py+1-3
- tests/python/test_ir_text_ast.py+1.5k
- tests/python/test_ir_text_from_py.py+1.1k
- tests/python/test_ir_text_printer.py+235
- tests/python/test_ir_traits.py+901
- tests/python/test_stl.py+1-1
- tests/python/test_type_converter.py+3-5
- tests/python/utils/test_kwargs_wrapper.py+82
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
| 280 | + | |
280 | 281 | | |
281 | 282 | | |
282 | 283 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
148 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
149 | 153 | | |
150 | 154 | | |
151 | 155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
459 | 460 | | |
460 | 461 | | |
461 | 462 | | |
462 | | - | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
463 | 467 | | |
464 | 468 | | |
465 | 469 | | |
| |||
498 | 502 | | |
499 | 503 | | |
500 | 504 | | |
501 | | - | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
502 | 509 | | |
503 | 510 | | |
504 | 511 | | |
| |||
533 | 540 | | |
534 | 541 | | |
535 | 542 | | |
536 | | - | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
537 | 547 | | |
538 | 548 | | |
539 | 549 | | |
| |||
675 | 685 | | |
676 | 686 | | |
677 | 687 | | |
| 688 | + | |
678 | 689 | | |
679 | 690 | | |
680 | 691 | | |
681 | | - | |
| 692 | + | |
| 693 | + | |
682 | 694 | | |
683 | 695 | | |
684 | 696 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| 75 | + | |
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
77 | | - | |
| 79 | + | |
| 80 | + | |
78 | 81 | | |
79 | 82 | | |
80 | 83 | | |
| |||
97 | 100 | | |
98 | 101 | | |
99 | 102 | | |
100 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
101 | 106 | | |
102 | 107 | | |
103 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
| 97 | + | |
96 | 98 | | |
97 | 99 | | |
98 | 100 | | |
99 | 101 | | |
100 | 102 | | |
101 | 103 | | |
102 | 104 | | |
103 | | - | |
| 105 | + | |
| 106 | + | |
104 | 107 | | |
105 | 108 | | |
106 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
121 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
122 | 126 | | |
123 | 127 | | |
124 | 128 | | |
| |||
162 | 166 | | |
163 | 167 | | |
164 | 168 | | |
| 169 | + | |
165 | 170 | | |
166 | 171 | | |
167 | | - | |
| 172 | + | |
| 173 | + | |
168 | 174 | | |
169 | 175 | | |
170 | 176 | | |
| |||
198 | 204 | | |
199 | 205 | | |
200 | 206 | | |
| 207 | + | |
201 | 208 | | |
202 | 209 | | |
203 | | - | |
| 210 | + | |
| 211 | + | |
204 | 212 | | |
205 | 213 | | |
206 | 214 | | |
| |||
258 | 266 | | |
259 | 267 | | |
260 | 268 | | |
| 269 | + | |
261 | 270 | | |
262 | 271 | | |
263 | 272 | | |
264 | | - | |
| 273 | + | |
| 274 | + | |
265 | 275 | | |
266 | 276 | | |
267 | 277 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
94 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
95 | 99 | | |
96 | 100 | | |
97 | 101 | | |
| |||
0 commit comments