Repository navigation
Closed
Description
With patch #11980
iree-compile --output-format=vm-bytecode \
--iree-hal-target-backends=cuda \
--iree-input-type=mhlo \
--iree-hal-cuda-llvm-target-arch=sm_80 \
iree_ecf5c970-ee97-49f0-a4ed-df1f34e9d493_MiniLML12H384Uncased.mlirError:
<unknown>:0: error: cannot be converted to LLVM IR: missing `LLVMTranslationDialectInterface` registration for dialect for op: builtin.unrealized_conversion_cast
<unknown>:0: note: see current operation: %45 = "builtin.unrealized_conversion_cast"(%44) : (!llvm.struct<(ptr<f32>, ptr<f32>, i64, array<2 x i64>, array<2 x i64>)>) -> memref<1
28x384xf32>
<unknown>:0: error: loc(fused["BatchMatMulV2:", "bert/encoder/layer_._0/attention/self/MatMul@__inference_predict_6353"]): failed to translate the MLIR LLVM dialect to the nativ
e llvm::Module
<unknown>:0: note: loc(fused["BatchMatMulV2:", "bert/encoder/layer_._0/attention/self/MatMul@__inference_predict_6353"]): see current operation:
"hal.executable.variant"() ({
"hal.executable.export"() ({
^bb0(%arg0: !hal.device, %arg1: index, %arg2: index):
%0 = "arith.constant"() {value = 4 : index} : () -> index
%1 = "arith.constant"() {value = 12 : index} : () -> index
%2 = "arith.constant"() {value = 1 : index} : () -> index
"hal.return"(%0, %1, %2) : (index, index, index) -> ()
}) {layout = #hal.pipeline.layout<push_constants = 0, sets = [<0, bindings = [<0, storage_buffer, ReadOnly>, <1, storage_buffer>, <2, storage_buffer>]>]>, ordinal = 0 : index,
sym_name = "predict_dispatch_6_generic_384x128", translation_info = #iree_codegen.translation_info<LLVMGPUTransposeSharedMem>, workgroup_local_memory = 4224 : index, workgroup_
size = [8 : index, 32 : index, 1 : index]} : () -> ()
"builtin.module"() ({
"llvm.mlir.global"() ({
}) {addr_space = 3 : i32, alignment = 16 : i64, global_type = !llvm.array<0 x i8>, linkage = #llvm.linkage<external>, sym_name = "__dynamic_shared_memory__"} : () -> ()
"llvm.mlir.global"() ({
}) {addr_space = 3 : i32, alignment = 4 : i64, global_type = !llvm.array<32 x array<33 x f32>>, linkage = #llvm.linkage<private>, sym_name = "__shared_memory__"} : () -> ()
"llvm.func"() ({
^bb0(%arg0: !llvm.ptr<f32>, %arg1: !llvm.ptr<f32>, %arg2: !llvm.ptr<f32>):
%0 = "llvm.mlir.constant"() {value = 3 : i64} : () -> i64
%1 = "llvm.mlir.constant"() {value = 2 : i64} : () -> i64
%2 = "llvm.mlir.constant"() {value = 1 : i64} : () -> i64
%3 = "llvm.mlir.constant"() {value = 0 : i32} : () -> i32
%4 = "llvm.mlir.constant"() {value = 63 : index} : () -> i64
%5 = "llvm.mlir.constant"() {value = 384 : index} : () -> i64
%6 = "llvm.mlir.constant"() {value = 128 : index} : () -> i64
%7 = "llvm.mlir.constant"() {value = 0 : i64} : () -> i64
%8 = "llvm.mlir.constant"() {value = dense<0.000000e+00> : vector<4xf32>} : () -> vector<4xf32>
%9 = "llvm.mlir.constant"() {value = 32 : index} : () -> i64
%10 = "llvm.mlir.constant"() {value = 8 : index} : () -> i64
%11 = "llvm.mlir.constant"() {value = -1 : index} : () -> i64
%12 = "llvm.mlir.constant"() {value = 4 : index} : () -> i64
%13 = "llvm.mlir.constant"() {value = -32 : index} : () -> i64
%14 = "llvm.mlir.constant"() {value = dense<0.000000e+00> : vector<1x4xf32>} : () -> !llvm.array<1 x vector<4xf32>>
%15 = "llvm.mlir.constant"() {value = dense<0.000000e+00> : vector<4x1xf32>} : () -> !llvm.array<4 x vector<1xf32>>
%16 = "llvm.mlir.constant"() {value = 0 : index} : () -> i64
%17 = "llvm.mlir.constant"() {value = 1 : index} : () -> i64
%18 = "llvm.mlir.constant"() {value = 2 : index} : () -> i64
%19 = "llvm.mlir.constant"() {value = 3 : index} : () -> i64
%20 = "llvm.mlir.constant"() {value = 33 : index} : () -> i64
%21 = "llvm.mlir.addressof"() {global_name = @__dynamic_shared_memory__} : () -> !llvm.ptr<array<0 x i8>, 3>
Metadata
Metadata
Assignees
Labels
No labels
Activity
MaheshRavishankar commentedon Feb 21, 2023
@ThomasRaoux could you help fix this on the CUDA side. This is blocking #11980 . The other blocking issues, I think we have a handle on.
ThomasRaoux commentedon Feb 21, 2023
what's the timeline your are looking at? I doubt I'll get to it right away. However it shouldn't extremely hard to debug if someone else wants to take a stab at it.
pzread commentedon Feb 21, 2023
I can take a look first to find the root cause (it seems like bufferization failed to handle some case and left a
unrealized_conversion_cast)ThomasRaoux commentedon Feb 21, 2023
Thanks, feel free to ping if you need any help
allieculp commentedon Apr 13, 2023
@pzread setting to 'in progress' by you - please update as needed.
pzread commentedon Jul 14, 2023
The compilation is now passed with multi-use fusion: