Commit a7fffaa
authored
Add context-free Call reinference and binding type propagation (#20480)
- Separate native context-free Call type inference from
builder-dependent Relax and distributed inference, with strict read-only
reinference from current Call inputs.
- Infer `tirx.buffer_data` from its BufferVar argument and reinfer after
pointer storage-scope rewrites.
- Migrate TVM structural visit and mutation hooks to native tvm-ffi
callbacks and remove the structural compatibility header.
- Propagate Bind and Let value type changes through their binder
definitions and later uses while preserving unchanged node identity.
- Reuse existing Call result Type objects when inference establishes an
equivalent result cheaply.1 parent b98f258 commit a7fffaa
87 files changed
Lines changed: 2661 additions & 1484 deletions
File tree
- 3rdparty
- include/tvm
- ir
- relax
- python/tvm
- ir
- relax/transform/legalize_ops
- src
- ir
- prim
- relax
- analysis
- backend
- adreno
- vm
- distributed
- ir
- op
- ccl
- distributed
- image
- memory
- nn
- tensor
- vision
- script/printer
- transform
- s_tir
- te
- tirx
- ir
- layout
- op
- transform
- tests/python
- relax
- tirx-base
- tirx
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
- include/tvm/ffi/reflection/native_function.h+8-2
- python/tvm_ffi/core.pyi+2
- python/tvm_ffi/cython/type_info.pxi+33-10
- python/tvm_ffi/stub/rust_generator/codegen.py+14-7
- python/tvm_ffi/stub/rust_generator/utils.py+12-6
- python/tvm_ffi/stub/utils.py+1
- rust/tvm-ffi/src/big_int.rs-429
- rust/tvm-ffi/src/big_int/int_ops.rs+741
- rust/tvm-ffi/src/big_int/mod.rs+862
- rust/tvm-ffi/src/error.rs+1
- rust/tvm-ffi/src/lib.rs+1-1
- rust/tvm-ffi/src/object.rs+22-20
- rust/tvm-ffi/tests/test_big_int.rs+697-41
- rust/tvm-ffi/tests/test_object.rs+116
- tests/cpp/test_native_function.cc+18
- tests/python/test_big_int.py+5-1
- tests/python/test_stubgen_rust.py+107-4
- tests/python/test_type_converter.py+42
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | | - | |
32 | | - | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
388 | 391 | | |
389 | 392 | | |
390 | 393 | | |
| |||
513 | 516 | | |
514 | 517 | | |
515 | 518 | | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
516 | 526 | | |
517 | 527 | | |
518 | 528 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
510 | 510 | | |
511 | 511 | | |
512 | 512 | | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
513 | 526 | | |
514 | 527 | | |
515 | 528 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
593 | 593 | | |
594 | 594 | | |
595 | 595 | | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
596 | 605 | | |
597 | 606 | | |
598 | 607 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
0 commit comments