Commit c8515e1
authored
[Web] Replace string with TVMFFIByteArray* to avoid memory issues (#18467)
Passing in a string to `ArrayDecodeStorage` via the packed function
definition led to memory issues for larger models (such as
`gemma-2-9b-it-q4f32_1-MLC`). Replacing string with TVMFFIByteArray*
fixes this issue and also alleviates the stack pollution issue discussed
in an earlier PR (#18415). Note that
this does not completely fix generation for q0f32 models.1 parent a8c7580 commit c8515e1
2 files changed
+37
-42
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
129 | 133 | | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
| 134 | + | |
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
140 | | - | |
| 141 | + | |
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
144 | 145 | | |
145 | | - | |
| 146 | + | |
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
| |||
151 | 152 | | |
152 | 153 | | |
153 | 154 | | |
154 | | - | |
| 155 | + | |
155 | 156 | | |
156 | 157 | | |
157 | 158 | | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | 159 | | |
165 | 160 | | |
166 | 161 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments