forked from OSchip/llvm-project
4c640e49c9
Indexing maps for named ops can reference attributes so that we can synthesize the indexing map dynamically. This supports cases like strides for convolution ops. However, it does cause an issue: now the indexing_maps() function call is dependent on those attributes. Linalg ops inherit LinalgOpInterfaceTraits, which calls verifyStructuredOpInterface() to verify the interface. verifyStructuredOpInterface() further calls indexing_maps(). Note that trait verification is done before the op itself, where ODS generates the verification for those attributes. So we can have indexing_maps() referencing non-existing or invalid attribute, before the ODS-generated verification kick in. There isn't a dependency handling mechansim for traits. This commit adds new interface methods to query whether an op hasDynamicIndexingMaps() and then perform verifyIndexingMapRequiredAttributes() in verifyStructuredOpInterface() to handle the dependency issue. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D96297 |
||
---|---|---|
.. | ||
mlir-cpu-runner | ||
mlir-cuda-runner | ||
mlir-linalg-ods-gen | ||
mlir-opt | ||
mlir-reduce | ||
mlir-rocm-runner | ||
mlir-shlib | ||
mlir-spirv-cpu-runner | ||
mlir-tblgen | ||
mlir-translate | ||
mlir-vulkan-runner | ||
CMakeLists.txt |