aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorLei Zhang <antiagainst@google.com>2021-02-09 08:47:21 -0500
committerLei Zhang <antiagainst@google.com>2021-02-09 08:48:29 -0500
commit4c640e49c9553363bc0e6fcbdbfe8d678683db97 (patch)
tree84178ccd139879593030f6495f348902f9cab28b /clang/lib/Frontend/CompilerInvocation.cpp
parente0b8604e5d3c80a727a833663e765c8057ce7825 (diff)
downloadllvm-4c640e49c9553363bc0e6fcbdbfe8d678683db97.zip
llvm-4c640e49c9553363bc0e6fcbdbfe8d678683db97.tar.gz
llvm-4c640e49c9553363bc0e6fcbdbfe8d678683db97.tar.bz2
[mlir][linalg] Verify indexing map required attributes
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
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions