Issue 135393
Summary [mlir][ROCDL] Intrinsic selection failure when adding Permlanex16Op to ROCDL
Labels mlir
Assignees
Reporter Muzammiluddin-Syed-ECE
    As part of a [change to improve subgroup_reduce lowering](https://github.com/llvm/llvm-project/pull/133204), the Permlanex16Op was added to the ROCDL dialect in mlir. However, when trying to use it to lowering a simple matvec, I encounter the "selection" error described below. 

Input MLIR:
```
!matA = tensor<32000x4096xf16>
!matB = tensor<2x4096xf16>
!matCF16 = tensor<32000x2xf16>
!matCF32 = tensor<32000x2xf32>

func.func @matvec(%arg0: !matA, %arg1: !matB) -> !matCF16 {
  %c0 = arith.constant 0 : index
  %cst = arith.constant 0.000000e+00 : f16
  %5 = tensor.empty() : !matCF32
  %6 = linalg.fill ins(%cst : f16) outs(%5 : !matCF32) -> !matCF32
  %7 = linalg.matmul_transpose_b ins(%arg0, %arg1 : !matA, !matB) outs(%6 : !matCF32) -> !matCF32
  %8 = arith.truncf %7 : !matCF32 to !matCF16
 return %8 : !matCF16
}
```

Command (in IREE):
```
iree-compile <input.mlir> --iree-hal-target-device=hip --iree-hip-target=gfx942
```

Output error:
```
LLVM ERROR: Cannot select: intrinsic %llvm.amdgcn.permlanex16
```

ISEL Debug + Error Backstrace: [See gist](https://gist.github.com/Muzammiluddin-Syed-ECE/d97900363901d5b36d5335016a751117#file-intrinsic_selection_failure_backstrace-txt)
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to