iree icon indicating copy to clipboard operation
iree copied to clipboard

Final logits compilation fails when slice of matmul

Open rsuderman opened this issue 6 months ago • 5 comments

Repro IR:

https://gist.github.com/rsuderman/b6d85a615bd0b56d34a4627aa5cd3904

Failure appears to occur as llvm IR level

rsuderman avatar Jun 16 '25 22:06 rsuderman

Could you provide your compilation command and the error that you see?

MaheshRavishankar avatar Jun 16 '25 22:06 MaheshRavishankar

I'll take a look at this, but would appreciate knowing the error message to look out for, @rsuderman .

Muzammiluddin-Syed-ECE avatar Jun 18 '25 15:06 Muzammiluddin-Syed-ECE

Taking a quick look at this

The error I see is:

<unknown>:0: error: resource does not exist
/home/muzasyed/projects/project13/samples/mlir/input.mlir:1:1: error: failed to translate the MLIR LLVM dialect to the native llvm::Module
module @module {

The resource in question seems to be coming from this:

%cst = arith.constant dense_resource<torch_tensor_4_torch.int64> : tensor<4xi64>

This line in the input mlir looks off.

The dense resource here is not well understood by the compiler (nor me). What is this supposed to represent? I assume 4 : int64?

Muzammiluddin-Syed-ECE avatar Jun 19 '25 19:06 Muzammiluddin-Syed-ECE

@rsuderman Let me know if there is an input file with a different dense_resource attribute that I should take a look at.

Muzammiluddin-Syed-ECE avatar Jun 19 '25 19:06 Muzammiluddin-Syed-ECE

@rsuderman that's why we need a repro 😀. Let me know what the priority of this is. If it is not too high to get a repro, then we can revisit it

MaheshRavishankar avatar Jun 19 '25 19:06 MaheshRavishankar