llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[mlir][xegpu] xegpu-vector-linearize aborts when lowering a tensor-backed vector.gather

Open lin334141-cell opened this issue 2 months ago • 1 comments

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:

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.extract registration diagnostic in convert-vector-to-scf, with a different operation/path.
  • #204713: the same xegpu-vector-linearize pass, but a vector.contract assertion 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.

lin334141-cell avatar Sep 24 '26 10:09 lin334141-cell

@llvm/issue-subscribers-mlir

Author: lin334141-cell

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&lt;?xf32&gt;, %i: vector&lt;1xi32&gt;, %m: vector&lt;1xi1&gt;, %p: vector&lt;1xf32&gt;, %o: index) -&gt; vector&lt;1xf32&gt; {
%v = vector.gather %b[%o][%i], %m, %p : tensor&lt;?xf32&gt;, vector&lt;1xi32&gt;, vector&lt;1xi1&gt;, vector&lt;1xf32&gt; into vector&lt;1xf32&gt;
return %v : vector&lt;1xf32&gt;
}

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:

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.extract registration diagnostic in convert-vector-to-scf, with a different operation/path.
  • #204713: the same xegpu-vector-linearize pass, but a vector.contract assertion 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.