Commit 82ef81a
authored
Generate 9 samples for reifying one sample with symbolic dimensions (#418)
* support checking model redundancy
* revert change of vision_model_test
* reformat python code.
* reformat bert_model_test.py and utils.py
* minor fix
* fix failed check by comparing directories after os.path.realpath()
* fix bugs in check_validate.sh
* set dynamic=False in single_device_runner.py
* reset graph hash
* add robustness code for generating input tensor constraints
* Introduce input_tensor_constraints.py using shape propagation logic.
* support dimension generalization for torch.Tensor.view and torch.Tensor.reshape
* 1) support dimension generalization for torch.Tensor.expand(); 2) fix bugs in generalization for torch.Tensor.view and torch.Tensor.reshape
* dimension_generalization_passes
* Refactored DimensionGeneralizationPass.__init__ to accept argument dim_axes_pairs, enabling targeted configuration for specific use cases
* save dimension generalization pass names into graph_net.json
* Generalize sequence dimension
* more dimension generalization passes for token dimension
* refactor parse_sole_graph_module
* Enhance the performance of the input_tensor_constraints.py file generation process.
* minor fix
* more dimension generalization pass
* fix some hint bugs
* generate input_tensor_constraints.py
* statisticize in tensor symbolic shapes
* remove empty samples
* update symbolic dimension reifier in graph_net.json
* generate 9 samples for reifying one sample with symbolic dimensions1 parent 0b25342 commit 82ef81a
File tree
4 files changed
+134
-17
lines changed- graph_net
- tools
- torch/sym_dim_reifiers
4 files changed
+134
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
| |||
49 | 52 | | |
50 | 53 | | |
51 | 54 | | |
52 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
53 | 61 | | |
54 | 62 | | |
55 | 63 | | |
| |||
64 | 72 | | |
65 | 73 | | |
66 | 74 | | |
| 75 | + | |
67 | 76 | | |
68 | 77 | | |
69 | 78 | | |
| |||
74 | 83 | | |
75 | 84 | | |
76 | 85 | | |
77 | | - | |
78 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
79 | 98 | | |
80 | 99 | | |
81 | 100 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
| 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 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
86 | 152 | | |
87 | 153 | | |
88 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
89 | 157 | | |
| 158 | + | |
| 159 | + | |
90 | 160 | | |
91 | 161 | | |
92 | 162 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
graph_net/tools/batch_apply_dim_gen_passes.sh renamed to graph_net/tools/apply_dim_gen_passes.sh
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
Lines changed: 47 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | | - | |
45 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
46 | 56 | | |
47 | 57 | | |
48 | 58 | | |
49 | 59 | | |
50 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
51 | 71 | | |
52 | 72 | | |
53 | 73 | | |
54 | 74 | | |
55 | | - | |
| 75 | + | |
56 | 76 | | |
57 | 77 | | |
58 | 78 | | |
59 | 79 | | |
60 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
61 | 91 | | |
62 | 92 | | |
63 | 93 | | |
64 | 94 | | |
65 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
66 | 106 | | |
67 | 107 | | |
68 | 108 | | |
| |||
0 commit comments