Commit be2e345
authored
Improve error handling and message of lowering helper functions. (#9722)
This PR improves the error handling and error message of some lowering
helper functions found in `helpers.{h,cpp}` C++ files.
**Key Changes:**
- Created `Safe*` versions of the functions:
- `Flatten`
- `DynamicReshape`
- `GetDynamicReshapeInfo`
- Created `CheckAtMostOneDynamicDimension()` function, a version of
`GetDynamicDimension` with improved error handling and messages
- Removed the `shape` parameter from `SafeFlatten()`
- It should be called separately
- Add missing includes ([IWYU ref][1])
[1]:
https://google.github.io/styleguide/cppguide.html#Include_What_You_Use1 parent 6c47e43 commit be2e345
2 files changed
Lines changed: 394 additions & 74 deletions
0 commit comments