Dynamic batch for rescale, gather, max_pool, avg_pool, conv2D and depthwise_conv2D. Split helper functions into a separate header file.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Move mlir/lib/Conversion/TosaToLinalg/TosaToLinalgCommon.h to mlir/include/mlir/Dialect/Tosa/Utils/utils.h. You can check mlir/include/mlir/Dialect/Linalg/Utils/Utils.h for an example on how to declare utilities for dialects.
| mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp | ||
|---|---|---|
| 14 | This should be a full path and not local. | |
| mlir/lib/Conversion/TosaToLinalg/TosaToLinalgCommon.h | ||
| 23 ↗ | (On Diff #398966) | Add an additional tosa namespace so that these helpers are not placed in the global mlir namespace. |
| 24 ↗ | (On Diff #398966) | I believe you can just use static to avoid the namespace collision. This is usually preferred to inline. |
| 57 ↗ | (On Diff #398966) | Rename to checkHasDynamicBatchDims. We can likely drop the Only and Has is more commonly used in names. |
| mlir/lib/Conversion/TosaToLinalg/TosaToLinalgNamed.cpp | ||
| 13 | ditto on full path. | |
| mlir/lib/Conversion/TosaToLinalg/TosaToLinalgCommon.h | ||
|---|---|---|
| 29 ↗ | (On Diff #398966) | Also, add documentation for what each function does. Once we move to Utils we can expect other libraries to use these functions. |
| mlir/include/mlir/Dialect/Tosa/Utils/CoversionUtils.h | ||
|---|---|---|
| 30 | Small typo, should be condenseValues | |
Small typo, should be condenseValues