diff options
| author | Sai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com> | 2024-07-01 14:50:04 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-01 14:50:04 -0400 |
| commit | 6e550430cf24a6324ce22f821181f2cab904d543 (patch) | |
| tree | f0552bbbb4a4f3c2cb503355d842baf6a7b8753d /tests/optimization | |
| parent | 0e71a6d40d2ccdc9e6bb861e7bbdb9479dbec636 (diff) | |
Error out when constructing tensor views from tensors with 0 stride. (#4516)
This avoids a problem with broadcasted tensors. Our tensor-view platform is designed to allow unrestricted access to tensor memory, while broadcasted tensors were designed for 'read-only' use-cases. Trying to write into a broadcasted tensor needs re-allocation, which Slang is not designed to do.
For now, we enforce contiguity on tensors with any 0 strides.
In the future, we will introduce a ConstTensorView object to allow such tensors to be used as an input.
This patch also propagates name-hint information through structs & arrays of tensors, to allow sensible names for the error messages (before this the error messages were temporary inst numbers, which is nearly impossible to debug)
Diffstat (limited to 'tests/optimization')
0 files changed, 0 insertions, 0 deletions
