Skip to content

[mlir][ROCDL] Intrinsic selection failure when adding Permlanex16Op to ROCDL #135393

@Muzammiluddin-Syed-ECE

Description

@Muzammiluddin-Syed-ECE

As part of a change to improve subgroup_reduce lowering, 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions