[mlir][xegpu] xegpu-vector-linearize aborts when lowering a tensor-backed vector.gather
The crash was reproduced on the fixed revision given below. I have not executed a binary built from current main, so this report does not claim that current main is runtime-confirmed affected.
Environment
- llvm-project revision:
1a31493a5cc8c05db3473ffa35f6c1d1289fcd22. - Assertions/build mode: not established from the retained build evidence.
- Current-main runtime status: not tested with a matching binary.
- Current-main source snapshot inspected:
47d06b4bf9499135a942a85867ad2c4536676ff6(source inspection only).
Reproducer
Save the following as minimized_reproducer.mlir:
func.func @f(%b: tensor<?xf32>, %i: vector<1xi32>, %m: vector<1xi1>, %p: vector<1xf32>, %o: index) -> vector<1xf32> {
%v = vector.gather %b[%o][%i], %m, %p : tensor<?xf32>, vector<1xi32>, vector<1xi1>, vector<1xf32> into vector<1xf32>
return %v : vector<1xf32>
}
Steps to reproduce
mlir-opt \
--pass-pipeline='builtin.module(xegpu-vector-linearize)' \
--verify-each \
minimized_reproducer.mlir
This exact set of command-line arguments was checked on the fixed revision above.
Actual behavior
The process aborts with SIGABRT (signal 6; return code -6 as reported by Python's subprocess API). The diagnostic begins with:
LLVM ERROR: tensor.extract created with unregistered dialect.
Expected behavior
The pass should not abort. Either the Tensor dialect needed by the installed lowering should be registered, or the pass/lowering should handle or reject the input without a fatal process abort.
Analysis
On the fixed revision:
XeGPUVectorLinearizePassinstallspopulateVectorGatherToConditionalLoadPatterns.- The tensor-backed gather lowering can create
tensor::ExtractOp. - The pass's
dependentDialectsdoes not listTensorDialect.
This appears consistent with the fatal unregistered-dialect diagnostic and suggests a missing dialect dependency on this lowering path. This is a source-based interpretation, not a confirmed root-cause analysis.
Related issues
- #60197: a similar
tensor.extractregistration diagnostic inconvert-vector-to-scf, with a different operation/path. - #204713: the same
xegpu-vector-linearizepass, but avector.contractassertion rather than this tensor-backed gather path.
I did not find an exact match in the targeted issue/PR search. This does not prove that no duplicate exists.
@llvm/issue-subscribers-mlir
Author: lin334141-cell
Environment
- llvm-project revision:
1a31493a5cc8c05db3473ffa35f6c1d1289fcd22. - Assertions/build mode: not established from the retained build evidence.
- Current-main runtime status: not tested with a matching binary.
- Current-main source snapshot inspected:
47d06b4bf9499135a942a85867ad2c4536676ff6(source inspection only).
Reproducer
Save the following as minimized_reproducer.mlir:
func.func @<!-- -->f(%b: tensor<?xf32>, %i: vector<1xi32>, %m: vector<1xi1>, %p: vector<1xf32>, %o: index) -> vector<1xf32> {
%v = vector.gather %b[%o][%i], %m, %p : tensor<?xf32>, vector<1xi32>, vector<1xi1>, vector<1xf32> into vector<1xf32>
return %v : vector<1xf32>
}
Steps to reproduce
mlir-opt \
--pass-pipeline='builtin.module(xegpu-vector-linearize)' \
--verify-each \
minimized_reproducer.mlir
This exact set of command-line arguments was checked on the fixed revision above.
Actual behavior
The process aborts with SIGABRT (signal 6; return code -6 as reported by Python's subprocess API). The diagnostic begins with:
LLVM ERROR: tensor.extract created with unregistered dialect.
Expected behavior
The pass should not abort. Either the Tensor dialect needed by the installed lowering should be registered, or the pass/lowering should handle or reject the input without a fatal process abort.
Analysis
On the fixed revision:
XeGPUVectorLinearizePassinstallspopulateVectorGatherToConditionalLoadPatterns.- The tensor-backed gather lowering can create
tensor::ExtractOp. - The pass's
dependentDialectsdoes not listTensorDialect.
This appears consistent with the fatal unregistered-dialect diagnostic and suggests a missing dialect dependency on this lowering path. This is a source-based interpretation, not a confirmed root-cause analysis.
Related issues
- #60197: a similar
tensor.extractregistration diagnostic inconvert-vector-to-scf, with a different operation/path. - #204713: the same
xegpu-vector-linearizepass, but avector.contractassertion rather than this tensor-backed gather path.
I did not find an exact match in the targeted issue/PR search. This does not prove that no duplicate exists.