This repository was archived by the owner on Apr 28, 2023. It is now read-only.
Commit cec3512
committed
Ensure input immutability
We have been talking about input immutability for a while in TC but it was enver actually implemented.
This adds a simple check to semantic analysis as well as a unit test to expect that input parameters are immutable.
Note that this is not foolproof because one may always abuse tmp/output tensors to be a view into a subportion of an input tensor but this is not intended to be commonplace.
In the future we may want to relax input immutability.1 parent bfd6d1f commit cec3512
2 files changed
+19
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| 158 | + | |
158 | 159 | | |
159 | 160 | | |
160 | 161 | | |
| |||
349 | 350 | | |
350 | 351 | | |
351 | 352 | | |
352 | | - | |
| 353 | + | |
353 | 354 | | |
354 | | - | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
355 | 358 | | |
| 359 | + | |
356 | 360 | | |
357 | 361 | | |
358 | 362 | | |
| |||
445 | 449 | | |
446 | 450 | | |
447 | 451 | | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
448 | 455 | | |
449 | 456 | | |
450 | 457 | | |
| |||
614 | 621 | | |
615 | 622 | | |
616 | 623 | | |
| 624 | + | |
617 | 625 | | |
618 | 626 | | |
619 | 627 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
200 | 209 | | |
201 | 210 | | |
202 | 211 | | |
| |||
0 commit comments