Skip to content

Commit 9ca7466

Browse files
SC llvm teamSC llvm team
SC llvm team
authored and
SC llvm team
committed
Merged main:39e93eee76ab into amd-gfx:d1314f0ddea4
Local branch amd-gfx d1314f0 Merged main:998bdae7f5ce into amd-gfx:1f2edbe54368 Remote branch main 39e93ee [TOSA] Handle dialect check more efficiently (llvm#120960)
2 parents d1314f0 + 39e93ee commit 9ca7466

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

llvm/include/llvm/Config/llvm-config.h.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
/* Indicate that this is LLVM compiled from the amd-gfx branch. */
1818
#define LLVM_HAVE_BRANCH_AMD_GFX
19-
#define LLVM_MAIN_REVISION 522502
19+
#define LLVM_MAIN_REVISION 522503
2020

2121
/* Define if LLVM_ENABLE_DUMP is enabled */
2222
#cmakedefine LLVM_ENABLE_DUMP

mlir/lib/Dialect/Tosa/Transforms/TosaValidation.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,9 +542,13 @@ bool TosaValidation::isValidElementType(Type type) {
542542

543543
void TosaValidation::runOnOperation() {
544544
configLevelAndProfile();
545+
546+
TosaDialect *tosaDialect = getContext().getLoadedDialect<TosaDialect>();
547+
if (!tosaDialect)
548+
return;
549+
545550
getOperation().walk([&](Operation *op) {
546-
if (!op->getDialect() ||
547-
op->getDialect()->getNamespace() != TosaDialect::getDialectNamespace())
551+
if (op->getDialect() != tosaDialect)
548552
return;
549553

550554
for (Value operand : op->getOperands()) {

0 commit comments

Comments
 (0)