[mlir][mesh] Exit after signalPassFailure to fix a crash (#132662)

Fixes #131435.
This commit is contained in:
Longsheng Mou
2025-03-24 20:19:56 +08:00
committed by GitHub
parent 997707172f
commit 94783a8199
2 changed files with 5 additions and 1 deletions

View File

@@ -369,7 +369,7 @@ struct ShardingPropagation
OpBuilder builder(ctx);
if (!region.hasOneBlock()) {
funcOp.emitOpError() << "only one block is supported!";
signalPassFailure();
return signalPassFailure();
}
Block &block = region.front();

View File

@@ -0,0 +1,4 @@
// RUN: mlir-opt --pass-pipeline="builtin.module(func.func(sharding-propagation))" %s -verify-diagnostics
// expected-error @+1 {{'func.func' op only one block is supported!}}
func.func private @no_block_function(i64)