Commit 78b1d25
authored
[AOT] Fix too long filename generation (#8738)
This change addresses the issue that when there is a complex kernel with
very long signature list, the generated filename possibly would get too
long to be recognized by python pathlib.
The out filename is constructed as
`kernel_name`.`8-char_sig_hash`_`suffix`.`ext`. `suffix` represents
signature hints in the form `param_id+c/d`, it holds all indexes to map
to the signature list.
This change tries to skip constant params in the signature list to
shorten the `suffix`, since they do not carry hints or extra
information.
This example show how this change work on a kernel with 71 parameters in
which there are 40 constants.
Before
```
kernel_out_name.f84b6f9a_0d1d2d3d456d7d8910111213d14d15d1617d18d19d2021d22d23d2425d26d27d2829d30d31323334353637383940414243444546474849505152535455565758596061626364656667686970.h
```
After
```
kernel_out_name.f84b6f9a_0d1d2d3d6d7d13d14d15d17d18d19d21d22d23d25d26d27d29d30d.h
```1 parent cb96f11 commit 78b1d25
2 files changed
+14
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
167 | 166 | | |
168 | | - | |
| 167 | + | |
169 | 168 | | |
170 | | - | |
| 169 | + | |
171 | 170 | | |
172 | 171 | | |
173 | 172 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
92 | | - | |
| 91 | + | |
93 | 92 | | |
94 | | - | |
95 | | - | |
96 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
107 | 109 | | |
108 | 110 | | |
109 | 111 | | |
| |||
0 commit comments