iree-org / iree

A retargetable MLIR-based machine learning compiler and runtime toolkit.
http://iree.dev/
Apache License 2.0
2.85k stars 614 forks source link

Broadcast_in_Dim e2e test fails to compile in VMVX backend #16513

Open bviyer opened 8 months ago

bviyer commented 8 months ago

What happened?

Compiling this file: https://github.com/openxla/iree/blob/main/tests/e2e/stablehlo_ops/broadcast_in_dim.mlir

... using the following command:

iree-compile /tmp/broadcast_in_dim_iree.mlir --iree-hal-target-backends=vmvx -o test.vmfb

... I got the following error:

/tmp/broadcast_in_dim_iree.mlir:59:12: error: failed to legalize operation 'util.buffer.load' that was explicitly marked illegal
    %res = "stablehlo.broadcast_in_dim"(%input) {broadcast_dimensions = dense<[1, 2]> : tensor<2xi64>} : (tensor<2x4xf16>) -> tensor<3x2x4xf16>
           ^
/tmp/broadcast_in_dim_iree.mlir:59:12: note: see current operation: %32 = "util.buffer.load"(%12, %18, %31, %1) : (!util.buffer, index, index, index) -> f16
/tmp/broadcast_in_dim_iree.mlir:59:12: error: conversion to vm.module failed
    %res = "stablehlo.broadcast_in_dim"(%input) {broadcast_dimensions = dense<[1, 2]> : tensor<2xi64>} : (tensor<2x4xf16>) -> tensor<3x2x4xf16>
           ^

Steps to reproduce your issue

No response

What component(s) does this issue relate to?

Compiler

Version information

HEAD is pointed to: 4a80ee36d52b35be25bf30ea6a0f9b423477f6e9

Additional context

No response

bviyer commented 8 months ago

Note; Same error is found in stablehlo.reduce for f16: https://github.com/openxla/iree/issues/16519